Allow setting the video player title to *ID* or *URL* in the configuration file. (https://github.com/trizen/youtube-viewer/issues/348)

Esse commit está contido em:
trizen
2020-11-30 19:58:44 +02:00
commit d10903c9fc
2 arquivos alterados com 6 adições e 12 exclusões
+3 -9
Ver Arquivo
@@ -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,
+3 -3
Ver Arquivo
@@ -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,