mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +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
|
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: Use insertGetId again in addGroup function
|
||||||
* Chg: Update phpunit to version 7.0.1
|
* Chg: Update phpunit to version 7.0.1
|
||||||
2018-02-12 DariusIII
|
2018-02-12 DariusIII
|
||||||
|
|||||||
+3
-3
@@ -776,7 +776,7 @@ class Releases
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function searchShows(
|
public function tvSearch(
|
||||||
array $siteIdArr = [],
|
array $siteIdArr = [],
|
||||||
$series = '',
|
$series = '',
|
||||||
$episode = '',
|
$episode = '',
|
||||||
@@ -922,7 +922,7 @@ class Releases
|
|||||||
*
|
*
|
||||||
* @return array
|
* @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(
|
$whereSql = sprintf(
|
||||||
'%s
|
'%s
|
||||||
@@ -991,7 +991,7 @@ class Releases
|
|||||||
*
|
*
|
||||||
* @return array
|
* @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(
|
$whereSql = sprintf(
|
||||||
'%s
|
'%s
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ $aniDB = new AniDB(['Settings' => $page->settings]);
|
|||||||
if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
|
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
|
// 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']);
|
$aniDbInfo = $aniDB->getAnimeInfo($_GET['id']);
|
||||||
|
|
||||||
if (! $releases && ! $aniDbInfo) {
|
if (! $releases && ! $aniDbInfo) {
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ switch ($function) {
|
|||||||
$airdate = str_replace('/', '-', $year[0].'-'.$episode);
|
$airdate = str_replace('/', '-', $year[0].'-'.$episode);
|
||||||
}
|
}
|
||||||
|
|
||||||
$relData = $releases->searchShows(
|
$relData = $releases->tvSearch(
|
||||||
$siteIdArr,
|
$siteIdArr,
|
||||||
$series,
|
$series,
|
||||||
$episode,
|
$episode,
|
||||||
@@ -205,7 +205,7 @@ switch ($function) {
|
|||||||
|
|
||||||
$imdbId = ($_GET['imdbid'] ?? -1);
|
$imdbId = ($_GET['imdbid'] ?? -1);
|
||||||
|
|
||||||
$relData = $releases->searchbyImdbId(
|
$relData = $releases->moviesSearch(
|
||||||
$imdbId,
|
$imdbId,
|
||||||
$offset,
|
$offset,
|
||||||
$api->limit(),
|
$api->limit(),
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
|
|||||||
$catarray = [];
|
$catarray = [];
|
||||||
$catarray[] = $category;
|
$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']);
|
$show = Video::getByVideoID($_GET['id']);
|
||||||
|
|
||||||
if (! $show) {
|
if (! $show) {
|
||||||
|
|||||||
Reference in New Issue
Block a user