From 0b54754a7f74540efd39d40f0fd305972dca9180 Mon Sep 17 00:00:00 2001 From: trizen Date: Wed, 28 Apr 2021 23:52:22 +0300 Subject: [PATCH] - Added the `:l` alias for listing user-playlists. - Replaced the `--audio!` option with `--novideo` to be consistent with the shorter alias `-n`. --- bin/youtube-viewer | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/youtube-viewer b/bin/youtube-viewer index 4bf0880..dec0369 100755 --- a/bin/youtube-viewer +++ b/bin/youtube-viewer @@ -829,7 +829,7 @@ usage: $execname [options] ([url] | [keywords]) * Arguments -f --fullscreen! : play videos in fullscreen mode - -n --audio! : play audio only, without displaying video + -n --novideo : play audio only, without displaying video --append-arg=s : append some command-line parameters to the media player --player=s : select a player to stream videos available players: @{[keys %{$CONFIG->{video_players}}]} @@ -1771,7 +1771,7 @@ sub parse_arguments { 'info|i|video-info=s' => \$opt{print_video_info}, 'get-term-width!' => \$opt{get_term_width}, 'page=i' => \$opt{page}, - 'novideo|no-video|n|audio!' => \$opt{novideo}, + 'novideo|no-video|n' => \$opt{novideo}, 'highlight!' => \$opt{highlight_watched}, 'autolike!' => \$opt{autolike_watched}, 'skip-watched!' => \$opt{skip_watched}, @@ -2849,8 +2849,8 @@ sub print_channels { } } - # :p=i, :playlist=i - elsif ($opt =~ /^(?:p|playlists?|up)${digit_or_equal_re}(.*)/) { + # :p=i, :playlist=i, :up=i + elsif ($opt =~ /^(?:p|l|playlists?|up)${digit_or_equal_re}(.*)/) { if (my @nums = get_valid_numbers($#{$channels}, $1)) { foreach my $id (@nums) { @@ -4767,7 +4767,7 @@ sub print_videos { } # :p=i, :playlist=i, :up=i - elsif ($opt =~ /^(?:p|playlists?|up)${digit_or_equal_re}(.*)/) { + elsif ($opt =~ /^(?:p|l|playlists?|up)${digit_or_equal_re}(.*)/) { if (my @nums = get_valid_numbers($#{$videos}, $1)) { foreach my $id (@nums) { my $request = $yv_obj->playlists($yv_utils->get_channel_id($videos->[$id]));