From 7d4bb0c1ede27209aa030c0214e1f2a53e8a9183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 2 Dec 2020 13:30:36 -0500 Subject: Allow setting the video title to *ID* or *URL* in the configuration file and remove smplayer support. (https://github.com/trizen/youtube-viewer/issues/348) --- bin/fair-viewer | 4 ++-- bin/gtk-fair-viewer | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/bin/fair-viewer b/bin/fair-viewer index 7f0d55f..dedeadc 100755 --- a/bin/fair-viewer +++ b/bin/fair-viewer @@ -160,7 +160,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 => { @@ -168,7 +168,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}, }, }, diff --git a/bin/gtk-fair-viewer b/bin/gtk-fair-viewer index f136ac0..34f1688 100755 --- a/bin/gtk-fair-viewer +++ b/bin/gtk-fair-viewer @@ -152,21 +152,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 => 'mpv', # autodetect it later @@ -3041,7 +3035,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, -- cgit v1.2.3