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

Support favourites that need to be queued (like Apple Music) #93

Closed
ebaauw opened this issue Jul 27, 2019 · 1 comment
Closed

Support favourites that need to be queued (like Apple Music) #93

ebaauw opened this issue Jul 27, 2019 · 1 comment

Comments

@ebaauw
Copy link
Owner

ebaauw commented Jul 27, 2019

Apparently, only some playlists (like Music Library) can be played directly from Sonos favourites, others (like Apple Music) cannot. When trying to play such a playlist, the zone player responds with HTTP status 500 (internal server error) and UPnP status 714. See #90 (comment).

When playing the favourite from the Sonos app, it first queues the playlist (after the current song of a playlist is already playing), seeks to the first track of the added playlist, and then issues play. homebridge-zp should be doing the same, maybe clearing the running queue first. Still unclear what types of playlists need to be queued and what not, but it looks like the Sonos app also queues my Music Library playlist.

eXtensible Markup Language
    <s:Envelope
        xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
        s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
            <u:AddURIToQueue
                xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
                <InstanceID>
                    0
                    </InstanceID>
                <EnqueuedURI>
                    x-file-cifs://server/Music/iTunes/iTunes%20Music%20Library.xml#BA1ED73E0486FB11
                    </EnqueuedURI>
                <EnqueuedURIMetaData>
                     [truncated]&lt;DIDL-Lite xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:upnp=&quot;urn:schemas-upnp-org:metadata-1-0/upnp/&quot; xmlns:r=&quot;urn:schemas-rinconnetworks-com:metadata-1-0/&quot; xmlns=&quot;urn:schemas-upnp-or
                    </EnqueuedURIMetaData>
                <DesiredFirstTrackNumberEnqueued>
                    6
                    </DesiredFirstTrackNumberEnqueued>
                <EnqueueAsNext>
                    1
                    </EnqueueAsNext>
                </u:AddURIToQueue>
            </s:Body>
        </s:Envelope>
eXtensible Markup Language
    <s:Envelope
        xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
        s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
            <u:Seek
                xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
                <InstanceID>
                    0
                    </InstanceID>
                <Unit>
                    TRACK_NR
                    </Unit>
                <Target>
                    1
                    </Target>
                </u:Seek>
            </s:Body>
        </s:Envelope>
eXtensible Markup Language
    <s:Envelope
        xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
        s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
            <u:Play
                xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
                <InstanceID>
                    0
                    </InstanceID>
                <Speed>
                    1
                    </Speed>
                </u:Play>
            </s:Body>
        </s:Envelope>

When something else is playing (e.g. TuneIn radio), it sets the AVTransportURI after adding to the Queue, an before seeking:

eXtensible Markup Language
    <s:Envelope
        xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
        s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
            <u:SetAVTransportURI
                xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
                <InstanceID>
                    0
                    </InstanceID>
                <CurrentURI>
                    x-rincon-queue:RINCON_000E58A8171201400#0
                    </CurrentURI>
                <CurrentURIMetaData>
                    </CurrentURIMetaData>
                </u:SetAVTransportURI>
            </s:Body>
        </s:Envelope>
@ebaauw
Copy link
Owner Author

ebaauw commented Jul 28, 2019

In v1.0.5

@ebaauw ebaauw closed this as completed Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant