Solving warnings.

This commit is contained in:
sergiotarxz 2021-01-18 02:28:53 +01:00
parent 5d263d02c3
commit ed3334712f
Signed by: sergiotarxz
GPG Key ID: E5903508B6510AC2
2 changed files with 4 additions and 4 deletions

View File

@ -115,7 +115,7 @@ sub youtube {
),
(
( defined $_->{qualityLabel} )
? ( qualityLabel => $_->{qualityLabel} =~ s/p$//r )
? ( qualityLabel => $_->{qualityLabel} =~ s/p.*$//r )
: ()
),
(
@ -139,8 +139,8 @@ sub youtube {
);
my $video_formats = [
sort {
$b->{qualityLabel} <=> $a->{qualityLabel}
|| $b->{bitrate} <=> $a->{bitrate}
$b->{qualityLabel} <=> $a->{qualityLabel}
|| ( $b->{bitrate} // 0 ) <=> ( $a->{bitrate} // 0 )
} grep { defined $_->{qualityLabel} } @formats
];
my $audio_formats = [

View File

@ -117,7 +117,7 @@ function downloadFormHandler(event) {
async function generateBlobVideo(url) {
const blob = await fetch(url, {
mode: 'cors',
mode: 'nocors',
})
.then(res => res.blob())
.catch( err => generateBlobVideoByProxy(url) );