mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Add prox_crc32 column to releases table and adjust NameFixer class
This commit is contained in:
@@ -30,6 +30,8 @@ class NameFixer
|
||||
public const PROC_HASH16K_DONE = 1;
|
||||
public const PROC_SRR_NONE = 0;
|
||||
public const PROC_SRR_DONE = 1;
|
||||
public const PROC_CRC_NONE = 0;
|
||||
public const PROC_CRC_DONE = 1;
|
||||
|
||||
// Constants for overall rename status
|
||||
public const IS_RENAMED_NONE = 0;
|
||||
@@ -364,11 +366,11 @@ class NameFixer
|
||||
INNER JOIN release_files rf ON rf.releases_id = rel.id
|
||||
WHERE (rel.isrenamed = %d OR rel.categories_id IN (%d, %d))
|
||||
AND rel.predb_id = 0
|
||||
AND proc_files = %d',
|
||||
AND rel.proc_crc32 = %d',
|
||||
self::IS_RENAMED_NONE,
|
||||
Category::OTHER_MISC,
|
||||
Category::OTHER_HASHED,
|
||||
self::PROC_FILES_NONE
|
||||
self::PROC_CRC_NONE
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2374,7 +2376,7 @@ class NameFixer
|
||||
$result = DB::select(
|
||||
sprintf(
|
||||
'
|
||||
SELECT rf.crc32 AS textstring, rel.categories_id, rel.name, rel.searchname, rel.fromname, rel.groups_id, rel.size as relsize, rel.predb_id as predb_id,
|
||||
SELECT rf.crc32, rel.categories_id, rel.name, rel.searchname, rel.fromname, rel.groups_id, rel.size as relsize, rel.predb_id as predb_id,
|
||||
rf.releases_id AS fileid, rel.id AS releases_id
|
||||
FROM releases rel
|
||||
LEFT JOIN release_files rf ON rf.releases_id = rel.id
|
||||
@@ -2395,7 +2397,7 @@ class NameFixer
|
||||
$type,
|
||||
$nameStatus,
|
||||
$show,
|
||||
$res->predbid
|
||||
$res->predb_id
|
||||
);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
2018-11-30 DariusIII
|
||||
* Chg: Add prox_crc32 column to releases table and adjust NameFixer class
|
||||
* Chg: Update spatie/laravel-permission to version 2.28
|
||||
2018-11-29 DariusIII
|
||||
* Fix: Fix wrong git commands used
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@
|
||||
</last>
|
||||
</scripts>
|
||||
<sql>
|
||||
<db>359</db>
|
||||
<file>359</file>
|
||||
<db>360</db>
|
||||
<file>360</file>
|
||||
</sql>
|
||||
</versions>
|
||||
</nntmux>
|
||||
|
||||
@@ -68,6 +68,7 @@ class CreateReleasesTable extends Migration
|
||||
processed');
|
||||
$table->boolean('proc_hash16k')->default(0)->comment('Has the release been hash16k
|
||||
processed');
|
||||
$table->boolean('proc_crc32')->default(0)->comment('Has the release been crc32 processed');
|
||||
$table->index(['groups_id','passwordstatus'], 'ix_releases_groupsid');
|
||||
$table->index(['postdate','searchname'], 'ix_releases_postdate_searchname');
|
||||
$table->index(['leftguid','predb_id'], 'ix_releases_leftguid');
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Add proc_crc32 column to releases table
|
||||
|
||||
ALTER ONLINE TABLE releases ADD COLUMN IF NOT EXISTS proc_crc32 BOOLEAN DEFAULT 0 COMMENT 'Has the release been crc32 processed';
|
||||
Reference in New Issue
Block a user