mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 23:01:29 +00:00
Remove remaining nzbstatus checks where not needed
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 !== '') {
|
||||
|
||||
+1
-1
@@ -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',
|
||||
[
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user