diff options
author | trizen <trizen@protonmail.com> | 2020-03-06 04:45:26 +0200 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-03-07 14:02:09 -0500 |
commit | 1cddf3aff73e53e07c816b9974347d4dbe8c33c3 (patch) | |
tree | fc99ae6378572a6014d0c3b63762268175b60640 /lib/WWW/FairViewer | |
parent | 82dacf03883cacbb27aad0fadee541e82684f299 (diff) | |
download | fair-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')
-rw-r--r-- | lib/WWW/FairViewer/Utils.pm | 6 |
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}//''; |