Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when showing playlists (imported playlist m3u files?) #43

Open
martinfowler opened this issue May 9, 2020 · 2 comments
Open

Error when showing playlists (imported playlist m3u files?) #43

martinfowler opened this issue May 9, 2020 · 2 comments

Comments

@martinfowler
Copy link

I installed sonos-web on my system. Much of it works, but if I hit the playlists or navigate to my (one) share, I get the following error on the web page

500: upnp: statusCode 500 & upnpErrorCode <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError xmlns="urn:schemas-upnp-org:control-1-0"><errorCode>701</errorCode></UPnPError></detail></s:Fault></s:Body></s:Envelope>

I spent some time trying to debug what's going on, and my hypothesis is that it's because my playlists are imported m3u files. For each one MusicLibrary.js::browse results in a call to _getAlbumArt which in turn calls this.sonos.searchMusicLibrary with the following parameters: "share", "//AVENTINUS/MUSIC/playlists/Folk.m3u", {} . As this call goes deeper into the node-sonos library it ends up in Service.js::_request() with the parameters: ("Browse" {"BrowseFlag":"BrowseDirectChildren","Filter":"*","StartingIndex":"0","RequestedCount":"100","SortCriteria":"","ObjectID":"S:%2F%2FAVENTINUS%2FMUSIC%2Fplaylists%2FRock.m3u"}) which generates a 500 from the Sonos unit.

My suspicion is that the Sonos considers it an error to ask an m3u file for BrowseDirectChildren, which is why it's returning a 500 error. I'm not sure how playlists work in general - I only use the m3u files - but perhaps other kinds of playlists yield a more sensible query to the Sonos system.

I'm thinking it ought to be reasonable to respond to this error in a more forgiving way as the album art isn't essential to displaying a playlist. But I'm not that familiar with the codebase, so will have to do a bit more digging first. But I thought I'd report what I'd discovered so far, in case it's useful. I'd be interested to know if other people with m3u files as playlists have the same behavior.

I'm running the following versions:

aventinus% node --version
v12.13.1
aventinus% sonos-web --version
1.3.1
aventinus% lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic
Piratmac added a commit to Piratmac/sonos-web that referenced this issue Oct 16, 2020
@Piratmac
Copy link

I stumbled on the same issue, and tried to look into it as well.
What I found is that M3U files can have #EXTIMG tab for an album art of the playlist. However, this is not standard.
I tried to create a playlist with this tag to test: the regular Sonos app on my phone doesn't display it at all. I would therefore venture that we don't need to look for the playlist's album art at all.
From what I understood, WPL playlist have no cover art at all (https://docs.microsoft.com/fr-fr/windows/win32/wmp/windows-media-playlist-elements-reference?redirectedfrom=MSDN)
PLS also don't have it (https://en.wikipedia.org/wiki/PLS_(file_format)?oldid=224380991)

I provided a pull request where album art will not be searched for playlists. I'm not a developer, I'm not sure if this is the best option, but it sounds like a good one ;)

@ghost
Copy link

ghost commented Feb 14, 2021

I have amended the in the fix and it solves the initial issue of the playlists screen throwing an error. However if you then click on a playlist I get the following error:
500: upnp: statusCode 500 & upnpErrorCode <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault>s:ClientUPnPError701</s:Fault></s:Body></s:Envelope>
Which is the same is the original log.
Playlist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants