RaspyFi - Topic: Playing MPD playlist from web interface http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/playing-mpd-playlist-from-web-interface/ Simple:Press Version 5.2.6 jotak on Playing MPD playlist from web interface http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/playing-mpd-playlist-from-web-interface/#p3108 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/playing-mpd-playlist-from-web-interface/#p3108 Hi all,

I lately found that the web interface wasn't able to play an MPD playlist, and figured out why : in file /var/www/inc/player_lib.php we can see playlists are recognized from their extension (pls or m3u), whereas MPD playlist may not have any extension. When a MPD playlist is sent to the "addQueue" method from player_lib.php, its path is actually the playlist name, as if located in the root folder. So I propose the following fix :

1. Edit player_lib.php
(sudo vi /var/www/inc/player_lib.php)

2. Find 'addQueue' function (/addQueue)

3. in "if ($fileext == 'm3u' OR $fileext == 'pls' ..." add a check of $path containing "/", that is :
if ($fileext == 'm3u' OR $fileext == 'pls' OR strpos($path, '/') === false) {

And that's it! restart the web player (or raspberry) and it'll work

]]>
Sat, 17 May 2014 09:55:14 +0200