We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cebc0f commit e4b0102Copy full SHA for e4b0102
bin/youtube-viewer
@@ -4750,7 +4750,7 @@ sub print_videos {
4750
@$videos = grep {
4751
ref($_) eq 'HASH' && ref($_->{id}) eq 'HASH'
4752
? (exists($_->{id}{kind})
4753
- ? $_->{id}{kind} eq 'youtube#video'
+ ? $yv_utils->is_video($_)
4754
: 0)
4755
: 1
4756
} @$videos;
lib/WWW/YoutubeViewer/Utils.pm
@@ -258,7 +258,11 @@ sub has_entries {
258
259
ref($result) eq 'HASH' or return;
260
261
- ($result->{pageInfo}{totalResults} // 0) > 0;
+ if (defined($result->{pageInfo}{totalResults})) {
262
+ return ($result->{pageInfo}{totalResults} > 0);
263
+ }
264
+
265
+ return 1; # maybe
266
}
267
268
=head2 normalize_filename($title, $fat32safe)
0 commit comments