Solving warnings.

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

View File

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

View File

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