Skip to content

Instantly share code, notes, and snippets.

@ntasos
Last active March 26, 2017 10:22
Show Gist options
  • Save ntasos/d2fc69ad456177a968a1bc1964de422c to your computer and use it in GitHub Desktop.
Save ntasos/d2fc69ad456177a968a1bc1964de422c to your computer and use it in GitHub Desktop.
mpv - Options for specific directories
-- 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