wew lad
This commit is contained in:
parent
3fe6bcab0a
commit
e9bf6bb063
1 changed files with 2 additions and 3 deletions
|
@ -59,7 +59,6 @@ if (!$ARGV[0]) {
|
||||||
$uuid =~ s/\/videos\/watch//;
|
$uuid =~ s/\/videos\/watch//;
|
||||||
my ($tmp_instance) = $input =~ m!(https?://[^:/]+)!;
|
my ($tmp_instance) = $input =~ m!(https?://[^:/]+)!;
|
||||||
$config{instance} = $tmp_instance;
|
$config{instance} = $tmp_instance;
|
||||||
@selected_video_data = get_video_data($uuid);
|
|
||||||
}
|
}
|
||||||
while ($uuid == -1) {
|
while ($uuid == -1) {
|
||||||
$response = search_video($config{instance}, $input, $counter);
|
$response = search_video($config{instance}, $input, $counter);
|
||||||
|
@ -83,7 +82,6 @@ if (!$ARGV[0]) {
|
||||||
$uuid =~ s/\/videos\/watch//;
|
$uuid =~ s/\/videos\/watch//;
|
||||||
my ($tmp_instance) = $input =~ m!(https?://[^:/]+)!;
|
my ($tmp_instance) = $input =~ m!(https?://[^:/]+)!;
|
||||||
$config{instance} = $tmp_instance;
|
$config{instance} = $tmp_instance;
|
||||||
@selected_video_data = get_video_data($uuid);
|
|
||||||
}
|
}
|
||||||
while ($uuid == -1) {
|
while ($uuid == -1) {
|
||||||
$response = search_video($config{instance}, $input, $counter);
|
$response = search_video($config{instance}, $input, $counter);
|
||||||
|
@ -95,6 +93,7 @@ if (!$ARGV[0]) {
|
||||||
$uuid = &select_video($json_obj);
|
$uuid = &select_video($json_obj);
|
||||||
@selected_video_data = get_video_data($uuid);
|
@selected_video_data = get_video_data($uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
play_video(\@selected_video_data);
|
play_video(\@selected_video_data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -145,7 +144,7 @@ sub select_video($) {
|
||||||
$config{instance} =~ s/^:i //;
|
$config{instance} =~ s/^:i //;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return "$videos_data[$input]->{uuid}";
|
return $videos_data[$prompt_input]->{uuid};
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_video_data($) {
|
sub get_video_data($) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue