Skip to content

Instantly share code, notes, and snippets.

@ntasos
ntasos / kdialog-open-files.lua
Last active January 26, 2024 12:36
KDialog-open-files, a lua script for mpv media player that uses KDE KDialog to open files, subtitles or URLs.
-- This is free and unencumbered software released into the public domain.
-- The software is provided "as is", without warranty of any kind.
-- Anyone is free to copy, modify, publish, use, compile, sell, or
-- distribute this software, either in source code form or as a compiled
-- binary, for any purpose, commercial or non-commercial, and by any means.
-- For more information, please refer to <http://unlicense.org/>
--
-- Use KDE KDialog to add files to playlist, subtitles to playing video or open URLs.
-- Based on 'mpv-open-file-dialog' <https://github.com/rossy/mpv-open-file-dialog>.
--
@ntasos
ntasos / directory_options.lua
Last active March 26, 2017 10:22
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"))