added response check for yts

This commit is contained in:
hnhx 2022-02-25 20:34:16 +01:00
parent 260ac36663
commit 2265569b72
2 changed files with 3 additions and 2 deletions

View file

@ -13,7 +13,8 @@
$response = request($url);
$json_response = json_decode($response, true);
if ($json_response["data"]["movie_count"] != 0)
if ($json_response["status"] == "ok" && $json_response["data"]["movie_count"] != 0)
{
foreach ($json_response["data"]["movies"] as $movie)
{

View file

@ -10,7 +10,7 @@
<input type="submit" style="display:none"/>
<div class="search-button-wrapper">
<button name="type" value="0" type="submit">Search with LibreX</button>
<button name="type" value="1" type="submit">Search images with LibreX</button>
<button name="type" value="3" type="submit">Search torrents with LibreX</button>
</div>
</form>