mherger wrote: 
> > Slim::Player::StreamingController::_playersMessage (796) Probleem:
> Kan
> > bestand niet openen voor:: spotify:track:63rTTYYRQUMK2JZIJ6pwXz
> 
> Interesting: this track would indeed not play ("Komodo" by "JF 
> Sebastien"). But spotty would skip right over it here.
> 
> I'll see why it's even showing up, as non playable items should not be 
> shown in Spotty.
> 
> -- 
> 
> Michael

Spotty never checks if a song is playable. In this case the song is not
playable due to market restrictions. 
I have made a fix in the code of API/Sync.pm to solve this issue:


sub playlistTrackIDs {
        my ($self, $id, $getFullData) = @_;

        my $offset = 0;
        my $tracks;

        do {
                my $params = {
                        *market => 'from_token',*
                        offset => $offset,
                        limit => SPOTIFY_PLAYLIST_TRACKS_LIMIT,
                };

                $params->{fields} = 'next,items(track(uri*,restrictions*))' if
!$getFullData;

                my $response = $self->_call("playlists/$id/tracks", $params);

                $offset = 0;

                if ( $response && $response->{items} && ref $response->{items} 
) {
                        push @$tracks, map {
                                $libraryCache->normalize($_->{track}) if 
$getFullData;
                                $_->{track}->{uri};
                        } grep {
                                $_->{track} && ref $_->{track} && 
$_->{track}->{uri} &&
$_->{track}->{uri} =~ /^spotify:(episode|track):/*  &&
!$_->{track}->{restrictions}*
                        } @{$response->{items}};
                        ($offset) = $response->{'next'} =~ /offset=(\d+)/;
                }
        } while $offset && $offset < SPOTIFY_MAX_LIMIT;

        return $tracks;
}

JP


------------------------------------------------------------------------
jepege's Profile: http://forums.slimdevices.com/member.php?userid=41763
View this thread: http://forums.slimdevices.com/showthread.php?t=112588

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to