mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
refactors scrapers and add kat and unofficial tpb dump scraper
This commit is contained in:
@@ -13,6 +13,7 @@ const Provider = database.define('provider', {
|
||||
const Torrent = database.define('torrent', {
|
||||
infoHash: { type: Sequelize.STRING(64), primaryKey: true },
|
||||
provider: { type: Sequelize.STRING(32), allowNull: false },
|
||||
torrentId: { type: Sequelize.STRING(128) },
|
||||
title: { type: Sequelize.STRING(256), allowNull: false },
|
||||
size: { type: Sequelize.BIGINT },
|
||||
type: { type: Sequelize.STRING(16), allowNull: false },
|
||||
@@ -42,7 +43,7 @@ const File = database.define('file',
|
||||
{
|
||||
indexes: [
|
||||
{ unique: true, fields: ['infoHash'], where: { fileIndex: { [Op.eq]: null } } },
|
||||
{ unique: true, fields: ['infoHash', 'fileIndex', 'imdbEpisode'] },
|
||||
{ unique: true, fields: ['infoHash', 'fileIndex', 'imdbSeason', 'imdbEpisode'] },
|
||||
{ unique: false, fields: ['imdbId', 'imdbSeason', 'imdbEpisode'] },
|
||||
{ unique: false, fields: ['kitsuId', 'kitsuEpisode'] }
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user