protected function addUris(array $tracks, int $position = null)
    {
        if ($position === null) {
            $position = $this->getNextPosition();
        }

        foreach ($tracks as $track) {
            $data = $this->soap("AVTransport", "AddURIToSavedQueue", [
                "UpdateID"              =>  $this->updateId,
                "EnqueuedURI"           =>  $track->getUri(),
                "EnqueuedURIMetaData"   =>  $track->getMetaData(),
                "AddAtIndex"            =>  $position,
            ]);
            $this->updateId = $data["NewUpdateID"];

            $position++;
        }
    }
protected function addUris(array $tracks, int $position = null)
    {
        if ($position === null) {
            $position = $this->getNextPosition();
        }

        foreach ($tracks as $track) {
            $data = $this->soap("AVTransport", "AddURIToSavedQueue", [
                "UpdateID"              =>  $this->updateId,
                "EnqueuedURI"           =>  $track->getUri(),
                "EnqueuedURIMetaData"   =>  $track->getMetaData(),
                "AddAtIndex"            =>  $position,
            ]);
            $this->updateId = $data["NewUpdateID"];

            $position++;
        }
    }
protected function addUris ( array $ tracks , int $ position = null ) { if ( $ position === null ) { $ position = $ this -> getNextPosition ( ) ; } foreach ( $ tracks as $ track ) { $ data = $ this -> soap ( "AVTransport" , "AddURIToSavedQueue" , [ "UpdateID" => $ this -> updateId , "EnqueuedURI" => $ track -> getUri ( ) , "EnqueuedURIMetaData" => $ track -> getMetaData ( ) , "AddAtIndex" => $ position , ] ) ; $ this -> updateId = $ data [ "NewUpdateID" ] ; $ position ++ ; } }
Add tracks to the playlist.

If no $position is passed the track will be added to the end of the playlist

@param UriInterface[] $tracks The tracks to add
@param int $position The position to insert the track in the playlist (zero-based)

@return void
Add tracks to the playlist .