Re: Want different players for radio streams and local music respectively
Argus <[email protected]> Sat, 09 May 2026 14:17:00 +0000
| Newsgroups | gmane.emacs.emms.user |
|---|---|
| Message-ID | <0orSkAdAndvVdZfelDQqzB4CzuRv7hzCNtQlJkFKnZjgrvMWtyOyBD4bt0lA-yZji5IY_03kMr3eOa3vb-VsE4FXRKW89gqunVZKWwFNmUI=@protonmail.com> |
Thank you for taking the time to look into my issue. I know this response i=
s months late, but I felt I should still write given that I seem to have re=
solved the problem.
In summary, I sought to play local music with mpd and internet radio with m=
pv. The relevant sections of my config are as follows:
To include both players:
(setopt emms-player-list '(emms-player-mpv emms-player-mpd))
To keep mpv from playing all emms media (as per Yoni Rabkin's suggestion):
(defun emms-player-mpv-playable-p (track)
(memq (emms-track-type track)
'(url streamlist)))
To avoid an error where a spurious mpd buffer pops up, I change a line in t=
he function `emms-player-mpd-playable-p' from:
(and (memq (emms-track-type track) '(file url playlist streamlist))
to:
(and (memq (emms-track-type track) '(file playlist))
With these changes in my config everything works as I expected.
On Wednesday, February 4th, 2026 at 3:59 PM, Yoni Rabkin <[email protected]>=
wrote:
> Yoni Rabkin <[email protected]> writes:
>
> >> Hello, I was having trouble getting EMMS to use different players for =
different audio sources. Namely, I would like to play internet radio stream=
s using mpv and local music using mpd.
> >> I tried adding lines like this:
> >> (emms-player-set emms-player-mpv 'regex "https?:\/\/")
> >> While having the player list as such:
> >> (setopt emms-player-list '(emms-player-mpv emms-player-mpd))
> >
> >> This resulted in mpv playing all audio, including local tracks. Is the=
re a way to limit mpv to only internet radio and keep emms-player-mpd handl=
ing the local files?
> >
> >> Thank you for any help
> >
> > I'll have a look at this as soon as I can (unless someone beats me to
> > it), sorry for the delay.
>
> Apologies for taking forever to get to this; travelling.
>
> At first glance it looks like the culprit would be that the function
> `emms-player-mpv-playable-p' in `emms-player-mpv.el' matches the track
> type to '(file url streamlist playlist). This precedes the regexp
> matching.
>
> What would happen if you redefined it to this (of course you'd have to
> do this after `emms-player-mpv.el' has been evaluated.):
>
> (defun emms-player-mpv-playable-p (track)
> (memq (emms-track-type track)
> '(streamlist)))
>
> --
> "Cut your own wood and it will warm you twice"
>