From 47ff134012b0e3c9f066caeda772f4b2f3e4bc3c Mon Sep 17 00:00:00 2001 From: Hechtus Date: Sun, 21 Dec 2014 11:20:07 +0100 Subject: [PATCH] Avoid warnings when the playlist type field is empty --- GoogleMusic/Playlists.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GoogleMusic/Playlists.pm b/GoogleMusic/Playlists.pm index 89ac41f..2766bf7 100644 --- a/GoogleMusic/Playlists.pm +++ b/GoogleMusic/Playlists.pm @@ -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};