Closed neeasade closed 1 year ago
Interesting! So for every new 'event' it outputs a single line of data telling you what has changed? Does mpc stay open on the terminal for this to happen?
Exactly.
I have a rough solution in mind for this, but the issue is, is that the socket doesn't report back changes to the mpv instance if you make them i.e. in the actual mpv player on the commandline, I could only return the data if the user does something that modifies the socket. I could then grab this socket output trivially, but it'll require some intrepid thinking to modify mpvc to stay open.
yeppyepp -- one part of this that would be nice is if I could point such a feature at a file location that doesn't exist yet, but there a socket will eventually be. then I could depend on that to fire up whenever I start mpv/react to that.
A bit late, but anyway, the command mpvc idleloop
is now available (#51) , it just reports back the events from the mpv socket. This was implemented to have a basic scrobling code in extras/mpvc-tui that reports playback events using libnotify to raise desktop notifications. There's some usage examples to get the idea in https://gmt4.github.io/mpvc/logbook.html#logbook-20221221.
Thanks for the bump - Could we tag a new release as well?
Thanks for the suggestion! A new v1.4 release has been tagged https://github.com/lwilletts/mpvc/releases/tag/1.4. Closing this.
mpc has
mpc idleloop
, which will output mpd events as they happen - this is useful for acting as a trigger for say, panel mpd status updates - I would like the same to be possible with mpvc - maybe have it monitor for a change in the socket type of thing?