From ebb0b766b6d417da377f10cc53bc22de66cbfa6f Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sun, 24 Aug 2025 10:02:05 +0200 Subject: [PATCH] Remove remaining nzbstatus checks where not needed --- Blacklight/Games.php | 1 - Blacklight/Movie.php | 3 +-- Blacklight/XXX.php | 2 +- Blacklight/processing/post/ProcessAdditional.php | 1 - Blacklight/processing/tv/TV.php | 2 +- misc/testing/PostProc/check_covers.php | 2 +- misc/testing/PostProc/check_previews.php | 2 +- misc/testing/PostProc/getXXXSamples.php | 2 +- 8 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Blacklight/Games.php b/Blacklight/Games.php index c059c3a34..2b7380d89 100755 --- a/Blacklight/Games.php +++ b/Blacklight/Games.php @@ -674,7 +674,6 @@ class Games public function processGamesReleases(): void { $query = Release::query() - ->where('nzbstatus', '=', 1) ->where('gamesinfo_id', '=', 0) ->where('categories_id', '=', Category::PC_GAMES); if ((int) Settings::settingValue('lookupgames') === 2) { diff --git a/Blacklight/Movie.php b/Blacklight/Movie.php index d1c68a195..cd0aac02f 100755 --- a/Blacklight/Movie.php +++ b/Blacklight/Movie.php @@ -1288,8 +1288,7 @@ class Movie $query = Release::query() ->select(['searchname', 'id']) ->whereBetween('categories_id', [Category::MOVIE_ROOT, Category::MOVIE_OTHER]) - ->whereNull('imdbid') - ->where('nzbstatus', '=', 1); + ->whereNull('imdbid'); // Apply filters if provided if ($groupID !== '') { diff --git a/Blacklight/XXX.php b/Blacklight/XXX.php index 3481d6e27..68b788b44 100755 --- a/Blacklight/XXX.php +++ b/Blacklight/XXX.php @@ -510,7 +510,7 @@ class XXX public function processXXXReleases(): void { $res = Release::query() - ->where(['nzbstatus' => 1, 'xxxinfo_id' => 0]) + ->where(['xxxinfo_id' => 0]) ->whereIn( 'categories_id', [ diff --git a/Blacklight/processing/post/ProcessAdditional.php b/Blacklight/processing/post/ProcessAdditional.php index 7dc6455a0..ec3c4c0e6 100755 --- a/Blacklight/processing/post/ProcessAdditional.php +++ b/Blacklight/processing/post/ProcessAdditional.php @@ -451,7 +451,6 @@ class ProcessAdditional protected function _fetchReleases(int|string $groupID, string &$guidChar): void { $releasesQuery = Release::query() - ->where('releases.nzbstatus', '=', 1) ->where('releases.passwordstatus', '=', -1) ->where('releases.haspreview', '=', -1) ->where('categories.disablepreview', '=', 0); diff --git a/Blacklight/processing/tv/TV.php b/Blacklight/processing/tv/TV.php index 9f4e94ec5..1d8a93408 100755 --- a/Blacklight/processing/tv/TV.php +++ b/Blacklight/processing/tv/TV.php @@ -135,7 +135,7 @@ abstract class TV extends Videos } $qry = Release::query() - ->where(['nzbstatus' => 1, 'videos_id' => 0, 'tv_episodes_id' => $status]) + ->where(['videos_id' => 0, 'tv_episodes_id' => $status]) ->where('size', '>', 1048576) ->whereBetween('categories_id', [Category::TV_ROOT, Category::TV_OTHER]) ->where('categories_id', '<>', Category::TV_ANIME) diff --git a/misc/testing/PostProc/check_covers.php b/misc/testing/PostProc/check_covers.php index 502ca6a72..34b1f714d 100644 --- a/misc/testing/PostProc/check_covers.php +++ b/misc/testing/PostProc/check_covers.php @@ -24,7 +24,7 @@ if (isset($argv[1]) && ($argv[1] === 'true' || $argv[1] === 'check')) { $res = DB::select('SELECT r.imdbid FROM releases r LEFT JOIN movieinfo m ON m.imdbid = r.imdbid - WHERE nzbstatus = 1 AND m.cover = 1 AND adddate > (NOW() - INTERVAL 24 HOUR) GROUP BY r.imdbid'); + WHERE m.cover = 1 AND adddate > (NOW() - INTERVAL 24 HOUR) GROUP BY r.imdbid'); foreach ($res as $row) { $nzbpath = $path2cover.$row->imdbid.'-cover.jpg'; diff --git a/misc/testing/PostProc/check_previews.php b/misc/testing/PostProc/check_previews.php index b172174d2..a9d58c825 100644 --- a/misc/testing/PostProc/check_previews.php +++ b/misc/testing/PostProc/check_previews.php @@ -29,7 +29,7 @@ if (isset($argv[1]) && ($argv[1] === 'true' || $argv[1] === 'check')) { $limit = $argv[2]; } $colorCli->header('Scanning for releases missing previews'); - $res = Release::query()->select('id', 'guid')->where(['nzbstatus' => 1, 'haspreview' => 1])->get()->toArray(); + $res = Release::query()->select('id', 'guid')->where(['haspreview' => 1])->get()->toArray(); foreach ($res as $row) { $nzbpath = $path2preview.$row['guid'].'_thumb.jpg'; if (! file_exists($nzbpath)) { diff --git a/misc/testing/PostProc/getXXXSamples.php b/misc/testing/PostProc/getXXXSamples.php index 206939da1..ac6ed9e08 100644 --- a/misc/testing/PostProc/getXXXSamples.php +++ b/misc/testing/PostProc/getXXXSamples.php @@ -23,7 +23,7 @@ if (isset($argv[1]) && ($argv[1] === 'true' || $argv[1] === 'check')) { $colorCli->header('Scanning for XXX UHD/HD/SD releases missing sample images'); $res = $pdo->query(sprintf('SELECT r.id, r.guid AS guid, r.searchname AS searchname FROM releases r - WHERE r.nzbstatus = 1 AND r.jpgstatus = 0 AND r.categories_id IN (%s, %s, %s) ORDER BY r.adddate DESC', Category::XXX_CLIPHD, Category::XXX_CLIPSD, Category::XXX_UHD)); + WHERE r.jpgstatus = 0 AND r.categories_id IN (%s, %s, %s) ORDER BY r.adddate DESC', Category::XXX_CLIPHD, Category::XXX_CLIPSD, Category::XXX_UHD)); foreach ($res as $row) { $nzbpath = $path2cover.$row['guid'].'_thumb.jpg'; if (! file_exists($nzbpath)) {