MK> Hi,
MK> Have been using recently-merged dochang/emms-player-mpv emms backend for
MK> a while, but recently had an thought to get track durations from mpv, as
MK> pre-scanning them otherwise from mostly-sshfs sources is quite slow.
MK> So implemented a different backend for mpv using its bidirectional "JSON
MK> IPC" API with long-running mpv instances (kinda like mpd):
MK>
https://github.com/mk-fg/emacs-setup/blob/master/extz/emms-player-mpv.el
MK> Advantages of using mpv this way vs player-simple (that I can think of):
This looks great! Couple of comments after a brief look at it:
1a. You should require s and dash in the header, as they both appear to be
dependencies. I can't immediately see any others.
1b. Neither is currently a dependency of EMMS, so either they'd have to be
added, or removed from your code.
2. In "emms-mpv-ipc-line", give the option for users to introduce their own
event handlers. This makes it easier to extend to support additional events.
3. As stated in another email, you use the --idle flag, which seems to exist
for this very purpose. Thanks for that.
4. A general convention when dealing with external processes in emacs is to
break up command line args and the actual program. It especially helps when
users want to use a specific binary. Otherwise, I'd have to modify just the
first argument of a list if I wanted to modify it at all in a robust way.
5. Adding to 4, I'd recommend making emms-mpv-proc-cmd a defcustom instead of a
defvar.
--
Ian Dunn
_______________________________________________
Emms-help mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/emms-help