aboutsummaryrefslogtreecommitdiffstats
path: root/lib/WWW/FairViewer.pm
diff options
context:
space:
mode:
authortrizen <trizen@protonmail.com>2020-03-10 16:08:45 +0200
committerJesús <heckyel@hyperbola.info>2020-03-10 21:59:29 -0500
commitfdda14979fab941c42203be599a381ac4298a059 (patch)
tree53f7ecffe498b1fb21e5bf8948758c91aff5a91f /lib/WWW/FairViewer.pm
parent78972399c69d991091b4de7f9556f0b61173d7a1 (diff)
downloadfair-viewer-fdda14979fab941c42203be599a381ac4298a059.tar.lz
fair-viewer-fdda14979fab941c42203be599a381ac4298a059.tar.xz
fair-viewer-fdda14979fab941c42203be599a381ac4298a059.zip
Always keep itag=22 when checking for `contentLength > 0`.
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'lib/WWW/FairViewer.pm')
-rw-r--r--lib/WWW/FairViewer.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/WWW/FairViewer.pm b/lib/WWW/FairViewer.pm
index 47e87c4..d117b95 100644
--- a/lib/WWW/FairViewer.pm
+++ b/lib/WWW/FairViewer.pm
@@ -824,7 +824,7 @@ sub _extract_streaming_urls {
@results = grep { not exists $_->{cipher} } @results;
# Keep only streams with contentLength > 0.
- @results = grep { exists($_->{contentLength}) and $_->{contentLength} > 0 } @results;
+ @results = grep { $_->{itag} == 22 or (exists($_->{contentLength}) and $_->{contentLength} > 0) } @results;
# Detect livestream
if (!@results and exists($json->{streamingData}) and exists($json->{streamingData}{hlsManifestUrl})) {