diff options
author | trizen <trizen@protonmail.com> | 2020-03-06 03:34:55 +0200 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-03-07 13:57:09 -0500 |
commit | 82dacf03883cacbb27aad0fadee541e82684f299 (patch) | |
tree | 0af68180b1b7467cccbc066a254b8e052a0b93b7 /lib | |
parent | bcc2d0bedcd582de39da89aaf6762ffe0aac5fa0 (diff) | |
download | fair-viewer-82dacf03883cacbb27aad0fadee541e82684f299.tar.lz fair-viewer-82dacf03883cacbb27aad0fadee541e82684f299.tar.xz fair-viewer-82dacf03883cacbb27aad0fadee541e82684f299.zip |
- Implemented support for playlists from username.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/WWW/FairViewer/Playlists.pm | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/WWW/FairViewer/Playlists.pm b/lib/WWW/FairViewer/Playlists.pm index b4e8412..9f40453 100644 --- a/lib/WWW/FairViewer/Playlists.pm +++ b/lib/WWW/FairViewer/Playlists.pm @@ -27,7 +27,6 @@ sub _make_playlists_url { $self->_make_feed_url( 'playlists', - pageToken => $self->page_token, %opts, ); } @@ -64,13 +63,7 @@ Get and return playlists from a channel ID. sub playlists { my ($self, $channel_id) = @_; - $self->_get_results( - $self->_make_playlists_url( - ($channel_id and $channel_id ne 'mine') - ? (channelId => $channel_id) - : do { $self->get_access_token() // return; (mine => 'true') } - ) - ); + $self->_get_results($self->_make_feed_url("channels/playlists/$channel_id")); } =head2 playlists_from_username($username) @@ -81,8 +74,7 @@ Get and return the playlists created for a given username. sub playlists_from_username { my ($self, $username) = @_; - my $channel_id = $self->channel_id_from_username($username) // $username; - $self->playlists($channel_id); + $self->playlists($username); } =head2 my_playlists() |