diff options
-rwxr-xr-x | bin/fair-viewer | 8 | ||||
-rw-r--r-- | lib/WWW/FairViewer/RegularExpressions.pm | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/bin/fair-viewer b/bin/fair-viewer index 526297d..b06dcda 100755 --- a/bin/fair-viewer +++ b/bin/fair-viewer @@ -2954,10 +2954,14 @@ FORMAT ## ok } elsif (valid_num($key, $playlists) and not $contains_keywords) { + + my $id = $yv_utils->get_playlist_id($playlists->[$key - 1]); + if ($args{return_playlist_id}) { - return $yv_utils->get_playlist_id($playlists->[$key - 1]); + return $id; } - get_and_print_videos_from_playlist($yv_utils->get_playlist_id($playlists->[$key - 1])); + + get_and_print_videos_from_playlist($id); } else { push @for_search, $key; diff --git a/lib/WWW/FairViewer/RegularExpressions.pm b/lib/WWW/FairViewer/RegularExpressions.pm index 6c298f2..6b8ed5f 100644 --- a/lib/WWW/FairViewer/RegularExpressions.pm +++ b/lib/WWW/FairViewer/RegularExpressions.pm @@ -26,7 +26,7 @@ our $digit_or_equal_re = qr/(?(?=[1-9])|=)/; our $non_digit_or_opt_re = qr{^(?!$range_num_re)(?>[0-9]{1,3}[^0-9]|[0-9]{4}|[^0-9$opt_begin_chars])}; # Generic name -my $generic_name_re = qr/[a-zA-Z0-9_.\-]{11,34}/; +my $generic_name_re = qr/[a-zA-Z0-9_.\-]{11,64}/; our $valid_channel_id_re = qr{^(?:.*/channel/)?(?<channel_id>(?:\w+(?:[-.]++\w++)*|$generic_name_re))(?:/.*)?\z}; our $get_channel_videos_id_re = qr{^.*/channel/(?<channel_id>(?:\w+(?:[-.]++\w++)*|$generic_name_re))}; |