JSON info: handle empty return string

This commit is contained in:
Timendum 2018-06-25 15:44:47 +02:00
parent c0b0141f33
commit b564f44c00
2 changed files with 6 additions and 6 deletions

View file

@ -306,7 +306,12 @@ class Downloader
$cmd .= " | python -m json.tool"; $cmd .= " | python -m json.tool";
} }
return shell_exec($cmd); $soutput = shell_exec($cmd);
if (!$soutput)
{
$this->errors[] = "No video found";
}
return $soutput;
} }
} }

View file

@ -14,11 +14,6 @@
} }
else else
{ {
if(isset($_GET['kill']) && !empty($_GET['kill']) && $_GET['kill'] === "all")
{
Downloader::kill_them_all();
}
$json = False; $json = False;
if(isset($_POST['urls']) && !empty($_POST['urls'])) if(isset($_POST['urls']) && !empty($_POST['urls']))