From 0040b3bf20dc09cf7bf3abd4ef4757a3be95a97e Mon Sep 17 00:00:00 2001 From: neumann <> Date: Fri, 9 Jun 2017 16:01:46 +0000 Subject: [PATCH] 37_Spotify: saved tracks offset git-svn-id: https://svn.fhem.de/fhem/trunk@14486 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/37_Spotify.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fhem/FHEM/37_Spotify.pm b/fhem/FHEM/37_Spotify.pm index 73d513fc1..1b708b008 100644 --- a/fhem/FHEM/37_Spotify.pm +++ b/fhem/FHEM/37_Spotify.pm @@ -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};