Quantcast
Channel: Squeezebox : Community : Forums - Logitech Media Server
Viewing all articles
Browse latest Browse all 5300

Improvements to UPnP / DLNA playlist support

$
0
0
Hi,

I've been using LMS for about a year and recently upgraded to the 7.9.0 series. I'd love to improve the current UPnP/DLNA support and am looking for some advice.

Right now when I send a track to an LMS player, it will clear the current playlist and play only that track. Initially I just want to change that behaviour so a DLNA track is processed as 'play next' (inserted into the current playlist) and then the playlist advanced to play that track. When the DLNA track finishes, the previous playlist would resume.

I've been reading through MediaRenderer/AVTransport.pm and spotted this code in SetAVTransportURI()

Code:

             
                        if ( $tstate eq 'NO_MEDIA_PRESENT' || $tstate eq 'STOPPED' ) {
                        # Both of these go to STOPPED, so load the track without playing it
                        $client->execute( [ 'playlist', 'clear' ] );
                        $client->execute( [ 'playlist', 'add', $upnp_uri, $meta->{title} ] );
                        $newstate = 'STOPPED';
                }

and then further down in Play():

Code:


        # All other cases, start playing the current transport URI
        # which has already been loaded to index 0 by SetAVTransportURI
        $client->execute([ 'playlist', 'jump', 0 ]);

This has a hardcoded index zero, so my question is (having never written a line of Perl code for LMS) how might I 'play next', get the playlist position and pass that to the Play function?

Cheers,
Gavin.

Viewing all articles
Browse latest Browse all 5300

Trending Articles