diff --git a/.ptclirc b/.ptclirc index 1c8b9fe..206ec40 100644 --- a/.ptclirc +++ b/.ptclirc @@ -6,6 +6,10 @@ $config{player} = "mpv"; +# Flags to pass the player, nothing by default + +$config{player_flags} = ""; + # Default instance to use. $config{instance} = "https://vid.qorg11.net"; @@ -14,6 +18,8 @@ $config{instance} = "https://vid.qorg11.net"; $config{default_resolution} = 0; + + # This tells perl everything's alright 1; diff --git a/peertube-cli b/peertube-cli index 62f757d..19fdcf5 100755 --- a/peertube-cli +++ b/peertube-cli @@ -53,9 +53,10 @@ our $counter = 0; # Process arguments GetOptions( - "instance=s" => \$config{instance}, - "resolution=i" => \$config{default_resolution}, - "player=s" => \$config{player} + "instance=s" => \$config{instance}, + "resolution=i" => \$config{default_resolution}, + "player=s" => \$config{player}, + "player-flags=s" => \$config{player_flags} ); # Main program while (1) { @@ -200,7 +201,7 @@ sub play_video($) { print "Video author: $author\n"; print "Resolution: $resolution\n"; - `$config{player} $url`; + `$config{player} $config{player_flags} $url`; } sub help_prompt() {