From fdda14979fab941c42203be599a381ac4298a059 Mon Sep 17 00:00:00 2001 From: trizen Date: Tue, 10 Mar 2020 16:08:45 +0200 Subject: Always keep itag=22 when checking for `contentLength > 0`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- lib/WWW/FairViewer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/WWW/FairViewer.pm') 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})) { -- cgit v1.2.3