diff options
Diffstat (limited to 'lib/WWW/FairViewer/Playlists.pm')
-rw-r--r-- | lib/WWW/FairViewer/Playlists.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/WWW/FairViewer/Playlists.pm b/lib/WWW/FairViewer/Playlists.pm index 01277c0..4294352 100644 --- a/lib/WWW/FairViewer/Playlists.pm +++ b/lib/WWW/FairViewer/Playlists.pm @@ -6,7 +6,7 @@ use warnings; =head1 NAME -WWW::FairViewer::Playlists - Fair playlists handle. +WWW::FairViewer::Playlists - YouTube playlists related mehods. =head1 SYNOPSIS @@ -25,7 +25,7 @@ sub _make_playlists_url { $opts{'part'} = 'snippet,contentDetails'; } - $self->_make_feed_url('playlists', %opts); + $self->_make_feed_url('playlists', %opts,); } sub get_playlist_id { @@ -60,7 +60,13 @@ Get and return playlists from a channel ID. sub playlists { my ($self, $channel_id) = @_; - $self->_get_results($self->_make_feed_url("channels/playlists/$channel_id")); + + if (my $results = $self->yt_channel_playlists($channel_id)) { + return $results; + } + + my $url = $self->_make_feed_url("channels/playlists/$channel_id"); + $self->_get_results($url); } =head2 playlists_from_username($username) |