mpv: sane-cast: fix crash due to missing table.concat
function
This commit is contained in:
@@ -137,7 +137,14 @@ let
|
||||
in
|
||||
{
|
||||
sane.programs.mpv = {
|
||||
packageUnwrapped = pkgs.wrapMpv (mpv-unwrapped.override { lua = pkgs.luajit; }) {
|
||||
packageUnwrapped = pkgs.wrapMpv
|
||||
(mpv-unwrapped.override rec {
|
||||
# N.B.: populating `self` to `luajit` is necessary for the resulting `lua.withPackages` function to preserve my override.
|
||||
# i use enable52Compat in order to get `table.unpack`.
|
||||
# i think using `luajit` here instead of `lua` is optional, just i get better perf with it :)
|
||||
lua = pkgs.luajit.override { enable52Compat = true; self = lua; };
|
||||
})
|
||||
{
|
||||
scripts = [
|
||||
pkgs.mpvScripts.mpris
|
||||
pkgs.mpvScripts.mpv-playlistmanager
|
||||
@@ -205,7 +212,7 @@ in
|
||||
# for `watch_later`
|
||||
".local/state/mpv"
|
||||
];
|
||||
fs.".config/mpv/scripts/sane-cast/main.lua".symlink.target = ./sane-cast-main.lua;
|
||||
fs.".config/mpv/scripts/sane-cast/main.lua".symlink.target = ./sane-cast/main.lua;
|
||||
fs.".config/mpv/scripts/sane-sysvol/main.lua".symlink.target = ./sane-sysvol/main.lua;
|
||||
fs.".config/mpv/scripts/sane-sysvol/non_blocking_popen.lua".symlink.target = ./sane-sysvol/non_blocking_popen.lua;
|
||||
fs.".config/mpv/input.conf".symlink.target = ./input.conf;
|
||||
|
@@ -33,7 +33,7 @@ ctrl+s async screenshot #! Utils > Screenshot
|
||||
alt+i script-binding uosc/keybinds #! Utils > Key bindings
|
||||
O script-binding uosc/show-in-directory #! Utils > Show in directory
|
||||
# script-binding uosc/open-config-directory #! Utils > Open config directory
|
||||
ctrl+r script-binding sane-cast/blast #! Audiocast
|
||||
ctrl+t script-binding sane-cast/go2tv-video #! Cast
|
||||
# script-binding sane-cast/go2tv-stream #! Cast (...) > Stream
|
||||
# script-binding sane-cast/go2tv-gui #! Cast (...) > GUI
|
||||
ctrl+r script-binding sane_cast/blast #! Audiocast
|
||||
ctrl+t script-binding sane_cast/go2tv-video #! Cast
|
||||
# script-binding sane_cast/go2tv-stream #! Cast (...) > Stream
|
||||
# script-binding sane_cast/go2tv-gui #! Cast (...) > GUI
|
||||
|
@@ -1,7 +1,11 @@
|
||||
msg = require("mp.msg")
|
||||
msg.trace("load: begin")
|
||||
|
||||
function subprocess(in_terminal, args)
|
||||
if in_terminal then
|
||||
args = { "xdg-terminal-exec", table.unpack(args) }
|
||||
end
|
||||
msg.info(table.concat(args, " "))
|
||||
mp.command_native({
|
||||
name = "subprocess",
|
||||
args = args,
|
||||
@@ -20,15 +24,15 @@ function invoke_go2tv(in_terminal, args)
|
||||
end
|
||||
|
||||
function invoke_go2tv_on_open_file(mode)
|
||||
local path = mp.get_property("stream-open-filename");
|
||||
return invoke_go2tv(true, { mode, path })
|
||||
msg.trace("invoke_go2tv_on_open_file")
|
||||
local path = mp.get_property("stream-open-filename")
|
||||
msg.trace("path:", path)
|
||||
invoke_go2tv(true, { mode, path })
|
||||
end
|
||||
|
||||
mp.add_key_binding(nil, "blast", function() subprocess(false, { "blast-to-default" }) end)
|
||||
mp.add_key_binding(nil, 'go2tv-gui', function() invoke_go2tv(false, {}) end)
|
||||
mp.add_key_binding(nil, 'go2tv-video', function() invoke_go2tv_on_open_file("-v") end)
|
||||
mp.add_key_binding(nil, 'go2tv-stream', function() invoke_go2tv_on_open_file("-s") end)
|
||||
mp.add_key_binding(nil, "go2tv-gui", function() invoke_go2tv(false, {}) end)
|
||||
mp.add_key_binding(nil, "go2tv-video", function() invoke_go2tv_on_open_file("-v") end)
|
||||
mp.add_key_binding(nil, "go2tv-stream", function() invoke_go2tv_on_open_file("-s") end)
|
||||
|
||||
-- uncomment for debugging:
|
||||
-- if mpv fails to eval this script (e.g. syntax error), then it will fail to quit on launch
|
||||
-- mp.command('quit')
|
||||
msg.trace("load: complete")
|
Reference in New Issue
Block a user