segler-alex / radiobrowser

website frontend with angular for radio-browser api
GNU Affero General Public License v3.0
117 stars 30 forks source link

Non conformal PLS playlist generation #180

Closed ZivaVatra closed 4 years ago

ZivaVatra commented 4 years ago

It seems that the radiobrowser PLS generator does not add the "numberofentries" line to the PLS (as shown here: https://en.wikipedia.org/wiki/PLS_%28file_format%29). This breaks those audio players that follow the standard strictly (MPD for example).

Example output from radiobrowser looks like this:

[playlist]
File1=http://mediam.streamakaci.com/toulousefm.mp3
Title1=Toulouse FM

When it should look like this:

[playlist]
File1=http://mediam.streamakaci.com/toulousefm.mp3
Title1=Toulouse FM
numberofentries=1

After adding "numberofentries=1" manually the playlists work perfectly. For multiple entries the same happens, so it isn't limited to single entry playlists.

As the logic to count the number of entries is already there (as seen in the File%d= format), we just need the total written out in "numberofentries" at the end

segler-alex commented 4 years ago

thank you! i will fix this tomorrow

segler-alex commented 4 years ago

it is fixed on www.radio-browser.info/webservice please check if its ok the newer second level servers i will update in the next few days.

segler-alex commented 4 years ago

fixed in all servers.