public function removeTracks(array $positions): bool
    {
        $ranges = [];
        $key = 0;
        $last = -1;
        sort($positions);
        foreach ($positions as $position) {
            $position++;
            if ($last > -1) {
                if ($position === $last + 1) {
                    $ranges[$key]++;
                    $last = $position;
                    continue;
                }
            }
            $key = $position;
            $ranges[$key] = 1;
            $last = $position;
        }

        $offset = 0;
        foreach ($ranges as $position => $limit) {
            $position -= $offset;
            $data = $this->soap("AVTransport", "RemoveTrackRangeFromQueue", [
                "UpdateID"          =>  $this->getUpdateID(),
                "StartingIndex"     =>  $position,
                "NumberOfTracks"    =>  $limit,
            ]);
            $this->updateId = $data;
            $offset += $limit;
        }
        return true;
    }
public function removeTracks(array $positions): bool
    {
        $ranges = [];
        $key = 0;
        $last = -1;
        sort($positions);
        foreach ($positions as $position) {
            $position++;
            if ($last > -1) {
                if ($position === $last + 1) {
                    $ranges[$key]++;
                    $last = $position;
                    continue;
                }
            }
            $key = $position;
            $ranges[$key] = 1;
            $last = $position;
        }

        $offset = 0;
        foreach ($ranges as $position => $limit) {
            $position -= $offset;
            $data = $this->soap("AVTransport", "RemoveTrackRangeFromQueue", [
                "UpdateID"          =>  $this->getUpdateID(),
                "StartingIndex"     =>  $position,
                "NumberOfTracks"    =>  $limit,
            ]);
            $this->updateId = $data;
            $offset += $limit;
        }
        return true;
    }
public function removeTracks ( array $ positions ) : bool { $ ranges = [ ] ; $ key = 0 ; $ last = - 1 ; sort ( $ positions ) ; foreach ( $ positions as $ position ) { $ position ++ ; if ( $ last > - 1 ) { if ( $ position === $ last + 1 ) { $ ranges [ $ key ] ++ ; $ last = $ position ; continue ; } } $ key = $ position ; $ ranges [ $ key ] = 1 ; $ last = $ position ; } $ offset = 0 ; foreach ( $ ranges as $ position => $ limit ) { $ position -= $ offset ; $ data = $ this -> soap ( "AVTransport" , "RemoveTrackRangeFromQueue" , [ "UpdateID" => $ this -> getUpdateID ( ) , "StartingIndex" => $ position , "NumberOfTracks" => $ limit , ] ) ; $ this -> updateId = $ data ; $ offset += $ limit ; } return true ; }
Remove tracks from the queue.

@param int[] $positions The zero-based positions of the tracks to remove

@return bool
Remove tracks from the queue .