From 1cddf3aff73e53e07c816b9974347d4dbe8c33c3 Mon Sep 17 00:00:00 2001 From: trizen Date: Fri, 6 Mar 2020 04:45:26 +0200 Subject: - Support for next pages of playlists from username. - Better detection for the last page of results. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- lib/WWW/FairViewer/Utils.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/WWW/FairViewer/Utils.pm') 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}//''; -- cgit v1.2.3