This commit is contained in:
qorg11 2021-11-07 20:10:47 +01:00
parent 3fe6bcab0a
commit e9bf6bb063
No known key found for this signature in database
GPG key ID: 343FC20A4ACA62B9

View file

@ -59,7 +59,6 @@ if (!$ARGV[0]) {
$uuid =~ s/\/videos\/watch//;
my ($tmp_instance) = $input =~ m!(https?://[^:/]+)!;
$config{instance} = $tmp_instance;
@selected_video_data = get_video_data($uuid);
}
while ($uuid == -1) {
$response = search_video($config{instance}, $input, $counter);
@ -83,7 +82,6 @@ if (!$ARGV[0]) {
$uuid =~ s/\/videos\/watch//;
my ($tmp_instance) = $input =~ m!(https?://[^:/]+)!;
$config{instance} = $tmp_instance;
@selected_video_data = get_video_data($uuid);
}
while ($uuid == -1) {
$response = search_video($config{instance}, $input, $counter);
@ -95,6 +93,7 @@ if (!$ARGV[0]) {
$uuid = &select_video($json_obj);
@selected_video_data = get_video_data($uuid);
}
play_video(\@selected_video_data);
}
@ -145,7 +144,7 @@ sub select_video($) {
$config{instance} =~ s/^:i //;
return -1;
}
return "$videos_data[$input]->{uuid}";
return $videos_data[$prompt_input]->{uuid};
}
sub get_video_data($) {