[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emms-help] mpv player alternative with json-ipc
From: |
Ian Dunn |
Subject: |
Re: [emms-help] mpv player alternative with json-ipc |
Date: |
Fri, 13 Apr 2018 15:23:05 -0400 |
User-agent: |
mu4e 1.0; emacs 26.0.91 |
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
- Re: [emms-help] mpv player alternative with json-ipc, (continued)
- Re: [emms-help] mpv player alternative with json-ipc, Mike Kazantsev, 2018/04/16
- Re: [emms-help] mpv player alternative with json-ipc, Pierre Neidhardt, 2018/04/17
- Re: [emms-help] mpv player alternative with json-ipc, Mike Kazantsev, 2018/04/17
- Re: [emms-help] mpv player alternative with json-ipc, Mike Kazantsev, 2018/04/17
- Re: [emms-help] mpv player alternative with json-ipc, Pierre Neidhardt, 2018/04/18
- Re: [emms-help] mpv player alternative with json-ipc, Mike Kazantsev, 2018/04/18
- Re: [emms-help] mpv player alternative with json-ipc, Pierre Neidhardt, 2018/04/18
- Re: [emms-help] mpv player alternative with json-ipc, Pierre Neidhardt, 2018/04/22
- Re: [emms-help] mpv player alternative with json-ipc, Mike Kazantsev, 2018/04/22
- Re: [emms-help] mpv player alternative with json-ipc, Pierre Neidhardt, 2018/04/22
Re: [emms-help] mpv player alternative with json-ipc,
Ian Dunn <=