forked from sergiotarxz/Peertube-dl
Solving warnings.
This commit is contained in:
parent
5d263d02c3
commit
ed3334712f
@ -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 = [
|
||||||
|
@ -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) );
|
||||||
|
Loading…
Reference in New Issue
Block a user