From 3dec9fd4208ef1062b9ed5f6776e9c8587225846 Mon Sep 17 00:00:00 2001 From: Mathieu Cartoixa Date: Wed, 24 Jan 2018 21:18:38 +0100 Subject: [PATCH] Return the number of results found --- .travis.yml | 2 +- dlm/search.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e63b052..7c7c845 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ php: - '5.6' env: - - DLM_PACKAGE_VERSION=1.0.$TRAVIS_BUILD_NUMBER + - DLM_PACKAGE_VERSION=1.1.$TRAVIS_BUILD_NUMBER install: - php bin/composer.phar install -n diff --git a/dlm/search.php b/dlm/search.php index 500cc41..295dfe2 100644 --- a/dlm/search.php +++ b/dlm/search.php @@ -25,7 +25,6 @@ public function prepare($curl, $query) 'format' => 'json_extended', 'token' => strval($this->token) )); - Echo 'URL: '.$url."\n"; curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => true, CURLOPT_URL => $url, @@ -50,6 +49,7 @@ public function parse($plugin, $response) $plugin->addResult($title, $download, $size, $datetime, $page, $hash, $seeds, $leechs, $category); } + return count($results->torrent_results); } private $token;