Skip to content

Commit

Permalink
Avoid warnings when the playlist type field is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
hechtus committed Dec 21, 2014
1 parent 368e5f8 commit 47ff134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GoogleMusic/Playlists.pm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ sub refresh {
# Now get all shared playlists
$googlePlaylists = $googleapi->get_all_playlists();
for my $googlePlaylist (@$googlePlaylists) {
if ($googlePlaylist->{type} eq 'SHARED') {
if (exists $googlePlaylist->{type} && $googlePlaylist->{type} eq 'SHARED') {
my $playlist = {};
$playlist->{name} = $googlePlaylist->{name};
$playlist->{uri} = 'googlemusic:playlist:' . $googlePlaylist->{id};
Expand Down

0 comments on commit 47ff134

Please sign in to comment.