jellyfin-mpv-shim icon indicating copy to clipboard operation
jellyfin-mpv-shim copied to clipboard

External MPV in flatpak

Open lowne opened this issue 1 year ago • 0 comments

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-spawn could do it), and if so prepending flatpak-spawn --host to the command
  • adding the relevant permission (org.freedesktop.Flatpak D-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"],

lowne avatar Sep 30 '24 09:09 lowne