Last active
March 26, 2017 10:22
-
-
Save ntasos/d2fc69ad456177a968a1bc1964de422c to your computer and use it in GitHub Desktop.
mpv - Options for specific directories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Use different options when playing files from a specific directory | |
-- as well as all of it's sub-directories. | |
-- Where "/home/user/video" insert the full path of the directory you wish | |
-- and enter whatever option you like. | |
local utils = require 'mp.utils' | |
function directory_options() | |
fullpath = utils.join_path(mp.get_property("working-directory"), mp.get_property("path")) | |
if string.match(fullpath, "/home/user/video") ~= nil then | |
mp.set_property_bool("fullscreen", true) | |
mp.set_property("osd-level", 3) | |
end | |
end | |
mp.observe_property("path", "string", directory_options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment