summaryrefslogtreecommitdiffstats
path: root/mpv/script_modules/mpvSockets/mpvSockets.lua
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-25 16:43:09 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-25 16:43:09 +0530
commita62114c91f2070c8c8453d117f3d81dc113e41ff (patch)
treef266e87af29a08c01f82bc32dd7d463d8ec4441a /mpv/script_modules/mpvSockets/mpvSockets.lua
parentaf120ab348f2e1a5a39dec035ed9dcf84189a64e (diff)
downloaddotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.gz
dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.bz2
dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.zip
dotfile update
Diffstat (limited to 'mpv/script_modules/mpvSockets/mpvSockets.lua')
-rw-r--r--mpv/script_modules/mpvSockets/mpvSockets.lua36
1 files changed, 0 insertions, 36 deletions
diff --git a/mpv/script_modules/mpvSockets/mpvSockets.lua b/mpv/script_modules/mpvSockets/mpvSockets.lua
deleted file mode 100644
index df8d078..0000000
--- a/mpv/script_modules/mpvSockets/mpvSockets.lua
+++ /dev/null
@@ -1,36 +0,0 @@
--- mpvSockets, one socket per instance, removes socket on exit
-
-local utils = require 'mp.utils'
-
-local function get_temp_path()
- local directory_seperator = package.config:match("([^\n]*)\n?")
- local example_temp_file_path = os.tmpname()
-
- -- remove generated temp file
- pcall(os.remove, example_temp_file_path)
-
- local seperator_idx = example_temp_file_path:reverse():find(directory_seperator)
- local temp_path_length = #example_temp_file_path - seperator_idx
-
- return example_temp_file_path:sub(1, temp_path_length)
-end
-
-tempDir = get_temp_path()
-
-function join_paths(...)
- local arg={...}
- path = ""
- for i,v in ipairs(arg) do
- path = utils.join_path(path, tostring(v))
- end
- return path;
-end
-
-ppid = utils.getpid()
-os.execute("mkdir " .. join_paths(tempDir, "mpvSockets") .. " 2>/dev/null")
-mp.set_property("options/input-ipc-server", join_paths(tempDir, "mpvSockets", ppid))
-
-function shutdown_handler()
- os.remove(join_paths(tempDir, "mpvSockets", ppid))
-end
-mp.register_event("shutdown", shutdown_handler)