diff options
Diffstat (limited to 'bin/fair-viewer')
-rwxr-xr-x | bin/fair-viewer | 31 |
1 files changed, 4 insertions, 27 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{ }, |