jishi/node-sonos-discovery

No Metadata when browsing SQ:4

Opened this issue · 3 comments

Hi

browsing SQ:4 does not return any metadata, for example:

> p.browseAll('SQ:4').then((res)=>console.log(res));
Promise { <pending> }
> [ { uri: 'x-sonos-http:track%3a235766083.mp3?sid=160&flags=8224&sn=7',
    title: 'R84 PODCAST444: HERZ & KLΔNG',
    artist: 'ROOM84',
    album: undefined,
    albumTrackNumber: undefined,
    albumArtUri: '/getaa?s=1&u=x-sonos-http%3atrack%253a235766083.mp3%3fsid%3d160%26flags%3d8224%26sn%3d7',
    metadata: undefined },
...

compared to another directory:

p.browseAll('FV:2').then((res)=>console.log(res));
Promise { <pending> }
> [ { uri: 'x-sonos-spotify:spotify%3atrack%3a7r539iSTidDcjXjdmvXtFe?sid=9&flags=8224&sn=16',
    title: 'Palace',
    artist: undefined,
    album: undefined,
    albumTrackNumber: undefined,
    albumArtUri: 'https://i.scdn.co/image/3fbbec43f3d052ea25b2ca4c3dc7bda180d28eb2',
    metadata: '<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:.... <snip>

when you want to queue/play a track from SQ:4 no metadata is visible on Sonos but only garbage like x-sonos-spotify:spotify%3atrack%3a7r5.... I found out that SQ:4 does not include metadata in the answer (no r:resMD). However when we attach the original xml as metadata itself, the metadata are correctly visible on Sonos.

I did an ugly workaround for the legacy version here: neophob@46117dd

jishi commented

What exactly is SQ:4? I don't remember ever seeing that. each queries have two different modes one can use, there might be required to send one or the other for this specific query (BrowseMetadata vs BrowseDirectChildren)

SQ:4 is the SONOS Playlist, which is the only list I saw without embedded metadata.

jishi commented

Hm, okay so SQ: gives you a list of all playlists, and SQ:4 is your fifth playlist, in order it seems. But I get metadata for my SQ:0 and SQ:1, and the tracks in those playlists are from Spotify. What kind of tracks do you have in your SQ:4? Do your other playlists have metadata?