diff --git a/spotify/spotify_playlists.go b/spotify/spotify_playlists.go index aa35796..5536fd1 100644 --- a/spotify/spotify_playlists.go +++ b/spotify/spotify_playlists.go @@ -1,6 +1,7 @@ package spotify import ( + "errors" "strings" "github.com/fabiofalci/sconsify/infrastructure" @@ -78,6 +79,9 @@ func (spotify *Spotify) initWebApiPlaylist(playlists *sconsify.Playlists) error } else { fmt.Printf("Loaded %v from %v playlists\n", offset, total) } + if total == 0 { + return errors.New("No playlist to load") + } } } else { return err