aboutsummaryrefslogtreecommitdiffstats
path: root/lib/WWW/FairViewer/Channels.pm
diff options
context:
space:
mode:
authortrizen <trizen@protonmail.com>2020-10-05 22:00:21 +0300
committerJesús <heckyel@hyperbola.info>2020-11-09 16:07:10 -0500
commit9838963cf2aab02241a37cee7d305025dc694d90 (patch)
tree3241214473b1295ffd3c28829814e04210309bfa /lib/WWW/FairViewer/Channels.pm
parentbe00b89005ffc38f257848b47d2e4a0b2a536c44 (diff)
downloadfair-viewer-9838963cf2aab02241a37cee7d305025dc694d90.tar.lz
fair-viewer-9838963cf2aab02241a37cee7d305025dc694d90.tar.xz
fair-viewer-9838963cf2aab02241a37cee7d305025dc694d90.zip
- Implemented support for trending categories.
Example: fair-viewer --trending # trending videos fair-viewer --trending=music # trending music videos fair-viewer -c # list trending categories In the Gtk version, the trending categories are listed in the "Categories" tab. - Several internal code tweaks and improvements. Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'lib/WWW/FairViewer/Channels.pm')
-rw-r--r--lib/WWW/FairViewer/Channels.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/WWW/FairViewer/Channels.pm b/lib/WWW/FairViewer/Channels.pm
index c554044..3ee44d4 100644
--- a/lib/WWW/FairViewer/Channels.pm
+++ b/lib/WWW/FairViewer/Channels.pm
@@ -41,6 +41,11 @@ Get the most popular videos for a given channel ID.
sub popular_videos {
my ($self, $channel_id) = @_;
+
+ if (not defined($channel_id)) { # trending popular videos
+ return $self->_get_results($self->_make_feed_url('popular'));
+ }
+
return $self->_get_results($self->_make_feed_url("channels/$channel_id/videos", sort_by => 'popular'));
}