fatg3erman / RompR

Web client for Mopidy and MPD
https://fatg3erman.github.io/RompR/
Other
189 stars 22 forks source link

radio: something went wrong retrieving the playlist #106

Closed jimydirektsaft closed 3 years ago

jimydirektsaft commented 3 years ago

Adding a radio station to the playlist fails with "something went wrong retrieving the playlist".

fatg3erman commented 3 years ago

Thanks for providing the logs, but I can't see the error and can't reproduce the problem. Are you using a custom logfile in rompr? Those don't contain php error messages or webserver messages, and it's those I need to see.

jimydirektsaft commented 3 years ago

Oh - sorry, I missed that the custom logfile is not sufficient. Below you can see the output in the nginx error log when this error occurs.

2021/02/21 11:30:25 [error] 22#22: *190 FastCGI sent in stderr: "PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /app/rompr/collection/playlistcollection.class.php on line 22" while reading response header from upstream, client: 172.16.254.58, server: _, request: "GET /api/tracklist/?_=1613903250979 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "dietpi:81", referrer: "http://dietpi:81/"

fatg3erman commented 3 years ago

I still can't reproduce the problem. Can you try something? Edit line 22 of rompr/collection/playlistcollection.class.php so it reads

if (is_array($filedata['Artist']) && count($filedata['Artist']) > 1) {

That ought to fix it, but I don't know if the same issue might occur somewhere else. I think it might be something to do with you running a different version of PHP than me so I can't test it.

jimydirektsaft commented 3 years ago

Yes this change eliminates the problem. Which is the recommended php version for RompR?

jimydirektsaft commented 3 years ago

I switched to php7.3 as a test, but the problem also arises with that.

fatg3erman commented 3 years ago

There isn't a reccomended version, it should work. I'm using 7.3 and can't reproduce the problem. Are you adding the radio station using mopidy-tunein, or are you using Rompr's tunein browser?

The fix as it stands is fine, I'm just curious as to why it is needed.

jimydirektsaft commented 3 years ago

I understand that. I'm adding the radio station with Rompr.

jimydirektsaft commented 3 years ago

If I add the radio station to the playlist with mopidy, Rompr updates the playlist without any error.

jimydirektsaft commented 3 years ago

I'm sorry accidentally closed

fatg3erman commented 3 years ago

I'm going to close it because I have fixed it. I'm not sure about why it needed fixing, but I can't be bothered to figure that out either :)

jimydirektsaft commented 3 years ago

Greate! Just updated to 1.55 :)