aboutsummaryrefslogtreecommitdiffstats
path: root/lib/WWW/FairViewer/Utils.pm
diff options
context:
space:
mode:
authortrizen <trizen@protonmail.com>2020-03-06 04:45:26 +0200
committerJesús <heckyel@hyperbola.info>2020-03-07 14:02:09 -0500
commit1cddf3aff73e53e07c816b9974347d4dbe8c33c3 (patch)
treefc99ae6378572a6014d0c3b63762268175b60640 /lib/WWW/FairViewer/Utils.pm
parent82dacf03883cacbb27aad0fadee541e82684f299 (diff)
downloadfair-viewer-1cddf3aff73e53e07c816b9974347d4dbe8c33c3.tar.lz
fair-viewer-1cddf3aff73e53e07c816b9974347d4dbe8c33c3.tar.xz
fair-viewer-1cddf3aff73e53e07c816b9974347d4dbe8c33c3.zip
- Support for next pages of playlists from username. - Better detection for the last page of results.
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'lib/WWW/FairViewer/Utils.pm')
-rw-r--r--lib/WWW/FairViewer/Utils.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/WWW/FairViewer/Utils.pm b/lib/WWW/FairViewer/Utils.pm
index 4e614f8..5ca1106 100644
--- a/lib/WWW/FairViewer/Utils.pm
+++ b/lib/WWW/FairViewer/Utils.pm
@@ -224,8 +224,10 @@ sub has_entries {
if (ref($result->{results}) eq 'HASH') {
- if (exists $result->{results}{comments}) {
- return scalar @{$result->{results}{comments}} > 0;
+ foreach my $type(qw(comments videos playlists)) {
+ if (exists $result->{results}{$type}) {
+ return scalar @{$result->{results}{$type}} > 0;
+ }
}
my $type = $result->{results}{type}//'';