jellyfin-mpv-shim
jellyfin-mpv-shim copied to clipboard
External MPV in flatpak
Regarding the numerous issues on running external mpv from flatpak - eg #375 #354 #329 #80 and #76 (indirectly) - is there any reason why flatpak-spawn --host /path/to/mpv can't be used internally? This can't be done by the end user because mpv_ext_path is passed as is and ultimately used as the binary path (as opposed to split into a List[str] then further extended with the other args).
This will need:
- figuring out when we're being run within the sandbox (surely there's a sanctioned way but perhaps just checking for
flatpak-spawncould do it), and if so prependingflatpak-spawn --hostto the command - adding the relevant permission (
org.freedesktop.FlatpakD-Bus interface) - possibly adding a filesystem permission for the socket/tempfile
or alternatively, allow it from conf.json; passing a list by ' '.split(mpv_ext_path) will most likely break on windows so maybe add an alternative mpv_ext_cmd field:
"mpv_ext": true,
"mpv_ext_path": "",
"mpv_ext_cmd": ["flatpak-spawn", "--host", "/path/to/mpv"],