2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

37_Spotify: saved tracks offset

git-svn-id: https://svn.fhem.de/fhem/trunk@14486 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
neumann 2017-06-09 16:01:46 +00:00
parent 38a167c74e
commit 0040b3bf20

View File

@ -524,7 +524,7 @@ sub Spotify_playSavedTracks($$$) { # play users saved tracks
my $name = $hash->{NAME};
$device_id = $first . (defined $device_id ? " " . $device_id : "") if(defined $first && $first !~ /^[0-9]+$/);
$first = 1 if(!defined $first || !$first !~ /^[0-9]+$/);
$first = 1 if(!defined $first || $first !~ /^[0-9]+$/);
Spotify_apiRequest($hash, 'me/tracks?limit=50'. ($first > 50 ? '&offset='. int($first/50)-1 : ''), undef, 'GET', 1); # getting saved tracks
my $result = $hash->{helper}{dispatch}{json}{items};