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:
@@ -151,21 +151,15 @@ my %CONFIG = (
|
|||||||
srt => q{--sub-file=*SUB*},
|
srt => q{--sub-file=*SUB*},
|
||||||
audio => q{--input-slave=*AUDIO*},
|
audio => q{--input-slave=*AUDIO*},
|
||||||
fs => q{--fullscreen},
|
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 => {
|
mpv => {
|
||||||
cmd => q{mpv},
|
cmd => q{mpv},
|
||||||
srt => q{--sub-file=*SUB*},
|
srt => q{--sub-file=*SUB*},
|
||||||
audio => q{--audio-file=*AUDIO*},
|
audio => q{--audio-file=*AUDIO*},
|
||||||
fs => q{--fullscreen},
|
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
|
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(
|
$cmd = $yv_utils->format_text(
|
||||||
streaming => $streaming,
|
streaming => $streaming,
|
||||||
|
|||||||
+3
-3
@@ -144,7 +144,7 @@ my %CONFIG = (
|
|||||||
srt => q{--sub-file=*SUB*},
|
srt => q{--sub-file=*SUB*},
|
||||||
audio => q{--input-slave=*AUDIO*},
|
audio => q{--input-slave=*AUDIO*},
|
||||||
fs => q{--fullscreen},
|
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},
|
novideo => q{--intf=dummy --novideo},
|
||||||
},
|
},
|
||||||
mpv => {
|
mpv => {
|
||||||
@@ -152,7 +152,7 @@ my %CONFIG = (
|
|||||||
srt => q{--sub-file=*SUB*},
|
srt => q{--sub-file=*SUB*},
|
||||||
audio => q{--audio-file=*AUDIO*},
|
audio => q{--audio-file=*AUDIO*},
|
||||||
fs => q{--fullscreen},
|
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},
|
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(
|
$cmd = $yv_utils->format_text(
|
||||||
streaming => $streaming,
|
streaming => $streaming,
|
||||||
|
|||||||
Referência em uma Nova Issue
Bloquear um usuário