Browse Source

added response check for yts

hnhx 3 years ago
parent
commit
2265569b72
2 changed files with 3 additions and 2 deletions
  1. 2 1
      engines/bittorrent/yts.php
  2. 1 1
      index.php

+ 2 - 1
engines/bittorrent/yts.php

@@ -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)
             {

+ 1 - 1
index.php

@@ -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>