From 739c821a54c01816e60eb5f774c8977a1e221ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Fri, 9 Jul 2021 15:27:16 -0500 Subject: upstream --- lib/WWW/FairViewer/Playlists.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/WWW/FairViewer/Playlists.pm') 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) -- cgit v1.2.3