mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 03:01:34 +00:00
Rename search functions to be more descriptive (ie. searchByImdbId searches for movies even without imdbid, so renamed to moviesSearch)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
2018-02-13 DariusIII
|
||||
* Chg: Rename search functions to be more descriptive (ie. searchByImdbId searches for movies even without imdbid, so renamed to moviesSearch)
|
||||
* Chg: Use insertGetId again in addGroup function
|
||||
* Chg: Update phpunit to version 7.0.1
|
||||
2018-02-12 DariusIII
|
||||
|
||||
+3
-3
@@ -776,7 +776,7 @@ class Releases
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function searchShows(
|
||||
public function tvSearch(
|
||||
array $siteIdArr = [],
|
||||
$series = '',
|
||||
$episode = '',
|
||||
@@ -922,7 +922,7 @@ class Releases
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function searchbyAnidbId($aniDbID, $offset = 0, $limit = 100, $name = '', array $cat = [-1], $maxAge = -1): array
|
||||
public function animeSearch($aniDbID, $offset = 0, $limit = 100, $name = '', array $cat = [-1], $maxAge = -1): array
|
||||
{
|
||||
$whereSql = sprintf(
|
||||
'%s
|
||||
@@ -991,7 +991,7 @@ class Releases
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function searchbyImdbId($imDbId, $offset = 0, $limit = 100, $name = '', array $cat = [-1], $maxAge = -1, $minSize = 0): array
|
||||
public function moviesSearch($imDbId, $offset = 0, $limit = 100, $name = '', array $cat = [-1], $maxAge = -1, $minSize = 0): array
|
||||
{
|
||||
$whereSql = sprintf(
|
||||
'%s
|
||||
|
||||
@@ -15,7 +15,7 @@ $aniDB = new AniDB(['Settings' => $page->settings]);
|
||||
if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
|
||||
|
||||
// force the category to TV_ANIME as it should be for anime, as $catarray was NULL and we know the category for sure for anime
|
||||
$aniDbReleases = $releases->searchbyAnidbId($_GET['id'], 0, 1000, '', [Category::TV_ANIME], -1);
|
||||
$aniDbReleases = $releases->animeSearch($_GET['id'], 0, 1000, '', [Category::TV_ANIME], -1);
|
||||
$aniDbInfo = $aniDB->getAnimeInfo($_GET['id']);
|
||||
|
||||
if (! $releases && ! $aniDbInfo) {
|
||||
|
||||
@@ -179,7 +179,7 @@ switch ($function) {
|
||||
$airdate = str_replace('/', '-', $year[0].'-'.$episode);
|
||||
}
|
||||
|
||||
$relData = $releases->searchShows(
|
||||
$relData = $releases->tvSearch(
|
||||
$siteIdArr,
|
||||
$series,
|
||||
$episode,
|
||||
@@ -205,7 +205,7 @@ switch ($function) {
|
||||
|
||||
$imdbId = ($_GET['imdbid'] ?? -1);
|
||||
|
||||
$relData = $releases->searchbyImdbId(
|
||||
$relData = $releases->moviesSearch(
|
||||
$imdbId,
|
||||
$offset,
|
||||
$api->limit(),
|
||||
|
||||
@@ -20,7 +20,7 @@ if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
|
||||
$catarray = [];
|
||||
$catarray[] = $category;
|
||||
|
||||
$rel = $releases->searchShows(['id' => $_GET['id']], '', '', '', 0, 1000, '', $catarray, -1);
|
||||
$rel = $releases->tvSearch(['id' => $_GET['id']], '', '', '', 0, 1000, '', $catarray, -1);
|
||||
$show = Video::getByVideoID($_GET['id']);
|
||||
|
||||
if (! $show) {
|
||||
|
||||
Reference in New Issue
Block a user