MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.17k stars 352 forks source link

How to correctly listen .pls playlists? #1864

Closed locutus3009 closed 1 year ago

locutus3009 commented 1 year ago

Bug report

Describe the bug

When using mpd with mpc/ncmpcpp, I cannot access pls playlists, only m3u

Expected Behavior

Play songs/internet radio using .pls playlists.

Actual Behavior

mpc lsplaylists does not show .pls playlists, the same for ncmpcpp.

Version

Music Player Daemon 0.23.12 (0.23.12)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2021 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp

Storage plugins:
 local smbclient udisks nfs curl

Neighbor plugins:
 smbclient upnp udisks

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [openmpt] mptm mod s3m xm it 669 amf ams c67 dbm digi dmf dsm dtm far imf ice j2b m15 mdl med mms mt2 mtm nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stp ult wow gdm mo3 oxm umx xpk ppm mmcmp
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
 [sidplay] sid mus str prg P00
 [wildmidi] mid
 [fluidsynth] mid
 [adplug] amd d00 hsc laa rad raw sa2
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps://
 [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo sndio pipe alsa ao oss openal pipewire pulse jack httpd snapcast recorder

Encoder plugins:
 null vorbis opus lame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip
 [iso] iso

Input plugins:
 file io_uring archive alsa curl ffmpeg smbclient nfs mms cdio_paranoia

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols:
 file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un

Configuration

bind_to_address         "0.0.0.0"
#bind_to_address         "~/.config/mpd/socket"
port                    "6600"

# Required files
db_file            "~/.config/mpd/database"
log_file           "~/.cache/mpd.log"

# Optional
music_directory    "~/Music"
playlist_directory "~/.config/mpd/playlists"
pid_file           "~/.config/mpd.local/pid"
state_file         "~/.config/mpd.local/state"
#sticker_file       "~/.config/mpd.local/sticker.sql"
follow_outside_symlinks     "yes"
follow_inside_symlinks      "yes"

audio_output {
       type            "pulse"
       name        "pulse audio"
}

playlist_plugin {
  name "m3u"
  enabled "true"
}

playlist_plugin {
  name "pls"
  enabled "true"
}

Log

> mpd --no-daemon --verbose
config_file: loading file /home/locutus/.config/mpd/mpd.conf
Sep 04 12:35 : libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'
Sep 04 12:35 : vorbis: Xiph.Org libVorbis 1.3.7
Sep 04 12:35 : opus: libopus 1.4
Sep 04 12:35 : sndfile: libsndfile-1.2.0
Sep 04 12:35 : hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled
Sep 04 12:35 : adplug: adplug 2.3.3
Sep 04 12:35 : simple_db: reading DB
Sep 04 12:35 : curl: version 8.2.1
Sep 04 12:35 : curl: with GnuTLS/3.7.9

Sample playlist

This does not work:

> cat musicofthegods.pls
[playlist]
NumberOfEntries=1
File1=http://listen.radionomy.com/musicofthegodsradio

This works:

> cat musicofthegods.m3u 
http://listen.radionomy.com/musicofthegodsradio
locutus3009 commented 1 year ago

Additional information

Debian unstable

> uname -a
Linux 6.4.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.4.4-3 (2023-08-08) x86_64 GNU/Linux
locutus3009 commented 1 year ago

The same behavior for the latest version

> mpd -V
Music Player Daemon 0.23.13 (0.23.13)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2021 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp

Storage plugins:
 local smbclient udisks nfs curl

Neighbor plugins:
 smbclient upnp udisks

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [openmpt] mptm mod s3m xm it 669 amf ams c67 dbm digi dmf dsm dtm far imf ice j2b m15 mdl med mms mt2 mtm nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stp ult wow gdm mo3 oxm umx xpk ppm mmcmp
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
 [sidplay] sid mus str prg P00
 [wildmidi] mid
 [fluidsynth] mid
 [adplug] amd d00 hsc laa rad raw sa2
 [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps://
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe alsa ao openal pipewire pulse jack httpd snapcast recorder

Encoder plugins:
 null vorbis opus lame twolame wave flac shine

Archive plugins:
 [bz2] bz2
 [zzip] zip
 [iso] iso

Input plugins:
 file io_uring archive alsa qobuz curl ffmpeg smbclient nfs mms cdio_paranoia

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols:
 file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// qobuz:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un
> mpd --no-daemon --verbose
config_file: loading file /home/locutus/.config/mpd/mpd.conf
Sep 04 18:44 : libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'
Sep 04 18:44 : vorbis: Xiph.Org libVorbis 1.3.7
Sep 04 18:44 : opus: libopus 1.4
Sep 04 18:44 : sndfile: libsndfile-1.2.2
Sep 04 18:44 : hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled
Sep 04 18:44 : adplug: adplug 2.3.3
Sep 04 18:44 : simple_db: reading DB
Sep 04 18:44 : input: Input plugin 'qobuz' is not configured: No Qobuz app_id configured
Sep 04 18:44 : curl: version 8.2.1
Sep 04 18:44 : curl: with GnuTLS/3.8.1
jcorporation commented 1 year ago

lsplaylists lists the stored playlists that are saved in the directory specified by the playlist_directory configuration option. I think only m3u files are supported for this type of playlists and should be created only through mpd.

.pls playlists are supported inside the music_directory, but this playlists are not listed by the lsplaylists command. Use the lsinfoprotocol command (mpc ls) to list songs and playlists in a specific directory in the music_directory.

locutus3009 commented 1 year ago

Very strange but it works. Thank you!

locutus3009 commented 1 year ago

Moreover, .pls playlists are listed with mpc lsplaylists command if I put them into music_directory