2 Commits

4 arquivos alterados com 13 adições e 16 exclusões
+4 -10
Ver Arquivo
@@ -29,7 +29,7 @@ use warnings;
no warnings 'once';
my $DEVEL; # true in devel mode
use if ($DEVEL = 0), lib => qw(../lib); # devel only
use if ($DEVEL = 1), lib => qw(../lib); # devel only
use WWW::PipeViewer v0.0.4;
use WWW::PipeViewer::RegularExpressions;
@@ -151,21 +151,15 @@ my %CONFIG = (
srt => q{--sub-file=*SUB*},
audio => q{--input-slave=*AUDIO*},
fs => q{--fullscreen},
arg => q{--quiet --play-and-exit --no-video-title-show --input-title-format=*TITLE*},
arg => q{--quiet --play-and-exit --no-video-title-show --input-title-format=*TITLE* *VIDEO*},
},
mpv => {
cmd => q{mpv},
srt => q{--sub-file=*SUB*},
audio => q{--audio-file=*AUDIO*},
fs => q{--fullscreen},
arg => q{--really-quiet --force-media-title=*TITLE* --no-ytdl},
arg => q{--really-quiet --force-media-title=*TITLE* --no-ytdl *VIDEO*},
},
smplayer => {
cmd => q{smplayer},
srt => q{-sub *SUB*},
fs => q{-fullscreen},
arg => q{-close-at-end -media-title *TITLE* *URL*},
},
},
video_player_selected => undef, # autodetect it later
@@ -3044,7 +3038,7 @@ sub get_player_command {
)
);
my $has_video = $cmd =~ /\*(?:VIDEO|URL|ID)\*/;
my $has_video = $cmd =~ /(?:^|\s)\*(?:VIDEO|URL)\*(?:\s|\z)/;
$cmd = $yv_utils->format_text(
streaming => $streaming,
+4 -4
Ver Arquivo
@@ -44,7 +44,7 @@ use warnings;
no warnings 'once';
my $DEVEL; # true in devel mode
use if ($DEVEL = 0), lib => qw(../lib); # devel mode
use if ($DEVEL = 1), lib => qw(../lib); # devel mode
use WWW::PipeViewer v0.0.4;
use WWW::PipeViewer::RegularExpressions;
@@ -144,7 +144,7 @@ my %CONFIG = (
srt => q{--sub-file=*SUB*},
audio => q{--input-slave=*AUDIO*},
fs => q{--fullscreen},
arg => q{--quiet --play-and-exit --no-video-title-show --input-title-format=*TITLE*},
arg => q{--quiet --play-and-exit --no-video-title-show --input-title-format=*TITLE* *VIDEO*},
novideo => q{--intf=dummy --novideo},
},
mpv => {
@@ -152,7 +152,7 @@ my %CONFIG = (
srt => q{--sub-file=*SUB*},
audio => q{--audio-file=*AUDIO*},
fs => q{--fullscreen},
arg => q{--really-quiet --force-media-title=*TITLE* --no-ytdl},
arg => q{--really-quiet --force-media-title=*TITLE* --no-ytdl *VIDEO*},
novideo => q{--no-video},
},
},
@@ -3355,7 +3355,7 @@ sub get_player_command {
)
);
my $has_video = $cmd =~ /\*(?:VIDEO|URL|ID)\*/;
my $has_video = $cmd =~ /(?:^|\s)\*(?:VIDEO|URL)\*(?:\s|\z)/;
$cmd = $yv_utils->format_text(
streaming => $streaming,
+3
Ver Arquivo
@@ -592,6 +592,9 @@ sub select_good_invidious_instances {
sub pick_random_instance {
my ($self) = @_;
# TODO: make sure the selected invidious instance actually works.
my @candidates = $self->select_good_invidious_instances();
if (not @candidates) {
+2 -2
Ver Arquivo
@@ -302,8 +302,8 @@ sub _extract_itemSection_entry {
$video{title} = _extract_title($info) // return;
$video{lengthSeconds} = _extract_length_seconds($info) || 0;
$video{liveNow} = ($video{lengthSeconds} == 0);
$video{author} = _extract_author_name($info);
$video{authorId} = _extract_channel_id($info);
$video{author} = _extract_author_name($info) // return;
$video{authorId} = _extract_channel_id($info) // return;
$video{publishedText} = _extract_published_text($info);
$video{viewCountText} = _extract_view_count_text($info);
$video{videoThumbnails} = _extract_thumbnails($info);