diff options
-rwxr-xr-x | bin/fair-viewer | 31 | ||||
-rwxr-xr-x | bin/gtk-fair-viewer | 12 |
2 files changed, 7 insertions, 36 deletions
diff --git a/bin/fair-viewer b/bin/fair-viewer index bea4842..3b82510 100755 --- a/bin/fair-viewer +++ b/bin/fair-viewer @@ -20,7 +20,7 @@ # https://framagit.org/heckyel/fair-viewer #------------------------------------------------------- -# fair-viewer is a command line utility for streaming YouTube videos in mpv/vlc/mplayer. +# fair-viewer is a command line utility for streaming YouTube videos in mpv/vlc. # This is a fork of youtube-viewer: # https://github.com/trizen/youtube-viewer @@ -173,20 +173,12 @@ my %CONFIG = ( arg => q{--really-quiet --title=*TITLE* --no-ytdl}, novideo => q{--no-video}, }, - mplayer => { - cmd => q{mplayer}, - srt => q{-sub *SUB*}, - audio => q{-audiofile *AUDIO*}, - fs => q{-fs}, - arg => q{-prefer-ipv4 -really-quiet -title *TITLE*}, - novideo => q{-novideo}, - }, }, video_player_selected => ( $constant{win32} - ? 'mplayer' - : 'mpv' # auto-defined + ? 'vlc' + : undef # auto-defined ), # YouTube options @@ -1783,21 +1775,6 @@ sub apply_input_arguments { return 1; } -# Get mplayer -sub get_mplayer { - if ($constant{win32}) { - my $smplayer = catfile($ENV{ProgramFiles}, qw(SMPlayer mplayer mplayer.exe)); - - if (not -e $smplayer) { - warn "\n\n!!! Please install SMPlayer in order to stream YouTube videos.\n\n"; - } - - return $smplayer; # Windows MPlayer - } - - return 'mplayer'; # *NIX MPlayer -} - # Get term width sub get_term_width { return $term_width if $constant{win32}; @@ -3348,7 +3325,7 @@ sub get_player_command { $MPLAYER{fullscreen} = $opt{fullscreen} ? $opt{video_players}{$opt{video_player_selected}}{fs} // '' : q{}; $MPLAYER{novideo} = $opt{novideo} ? $opt{video_players}{$opt{video_player_selected}}{novideo} // '' : q{}; - $MPLAYER{mplayer_arguments} = $opt{video_players}{$opt{video_player_selected}}{arg} // q{}; + $MPLAYER{arguments} = $opt{video_players}{$opt{video_player_selected}}{arg} // q{}; my $cmd = join( q{ }, diff --git a/bin/gtk-fair-viewer b/bin/gtk-fair-viewer index 42ab174..096f9a9 100755 --- a/bin/gtk-fair-viewer +++ b/bin/gtk-fair-viewer @@ -162,13 +162,6 @@ my %CONFIG = ( fs => q{--fullscreen}, arg => q{--really-quiet --title=*TITLE* --no-ytdl}, }, - mplayer => { - cmd => q{mplayer}, - srt => q{-sub *SUB*}, - audio => q{-audiofile *AUDIO*}, - fs => q{-fs}, - arg => q{-prefer-ipv4 -really-quiet -title *TITLE*}, - }, smplayer => { cmd => q{smplayer}, srt => q{-sub *SUB*}, @@ -3050,8 +3043,9 @@ sub get_player_command { my ($streaming, $video) = @_; my %MPLAYER; - $MPLAYER{fullscreen} = $CONFIG{fullscreen} ? $CONFIG{video_players}{$CONFIG{video_player_selected}}{fs} : q{}; - $MPLAYER{mplayer_arguments} = $CONFIG{video_players}{$CONFIG{video_player_selected}}{arg} // q{}; + + $MPLAYER{fullscreen} = $CONFIG{fullscreen} ? $CONFIG{video_players}{$CONFIG{video_player_selected}}{fs} : q{}; + $MPLAYER{arguments} = $CONFIG{video_players}{$CONFIG{video_player_selected}}{arg} // q{}; my $cmd = join( q{ }, |