Closed Midek closed 4 years ago
After some poking around, it seems mpv-mpris is using GLib in a way that doesn't work when you try to load the plugin again after the first time. This is bad for jftui, as there are no other ways to react to an MPV_EVENT_SHUTDOWN
than restarting mpv from scratch or exiting. Shutdown events are spawned when mpv receives a quit
command (like pressing q with the default bindings) so for the sake of uniformity (as a restart means losing property changes you made in the meantime, like the volume level), with the last release I made mpv restart also when jftui stops playback at the end of a playlist.
I'll try opening an issue with the dev, but I think it would be a lot of work to make mpv-mpris behave as we need it so I don't know if and when they might get to it.
If its not too much trouble, could you add configuration parameter that would restore old behavior and not send shutdown event when stopping playback?
I'd rather not to be honest, the new behavior makes more sense outside of this issue. Frankly, I hadn't even realized jftui was trying to load scripts together with config files; they should be considered unsupported for now.
You may have another workaround, though: a stop
command will not cause the mpv core to abort and need to be restarted, so you may want to remap your q key to that and manually kill playback before it's over. stop
also makes normal mpv exit like quit
so it's fine outside of jftui too.
I see, the new behavior indeed makes more sense. I guess i will just stay on the old version for the time being, and hope they fix the plugin.
Sorry to bother you with this, cheers.
@Midek , FYI the problem was just kindly fixed on mpv-mpris's side, so if you rebuild it and install from the latest master (it's not in a release yet) it will play along nicely with jftui :)
Awesome, thanks!
With mpv-mpris plugin enabled, jftui will segfault after video finishes playing or when stopping playback with 'q'
Stack trace looks like this for both cases:
Back on 0.2.1 version when video would stop playing on its own, jftui did not crash. As far as i remember, it did segfault when stopping mpv playback with 'q' though (i rarely stopped playback like this so it was not an issue)
PS. the mpv-mpris plugin version is 0.4-1, installed from AUR