mirror of
https://github.com/timendum/Youtube-dl-WebUI.git
synced 2025-02-28 15:43:24 +08:00
JSON info: handle empty return string
This commit is contained in:
parent
c0b0141f33
commit
b564f44c00
2 changed files with 6 additions and 6 deletions
|
@ -306,7 +306,12 @@ class Downloader
|
|||
$cmd .= " | python -m json.tool";
|
||||
}
|
||||
|
||||
return shell_exec($cmd);
|
||||
$soutput = shell_exec($cmd);
|
||||
if (!$soutput)
|
||||
{
|
||||
$this->errors[] = "No video found";
|
||||
}
|
||||
return $soutput;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
5
info.php
5
info.php
|
@ -14,11 +14,6 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
if(isset($_GET['kill']) && !empty($_GET['kill']) && $_GET['kill'] === "all")
|
||||
{
|
||||
Downloader::kill_them_all();
|
||||
}
|
||||
|
||||
$json = False;
|
||||
|
||||
if(isset($_POST['urls']) && !empty($_POST['urls']))
|
||||
|
|
Loading…
Reference in a new issue