From a3cc795680c4ed137124ecf22c4a14d9283ea356 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Thu, 12 Mar 2020 14:27:55 +0100 Subject: [PATCH] adds language and resolution to torrent table --- addon/lib/repository.js | 4 +++- scraper/lib/repository.js | 26 +++++++++++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/addon/lib/repository.js b/addon/lib/repository.js index 730f02b..945eb3e 100644 --- a/addon/lib/repository.js +++ b/addon/lib/repository.js @@ -15,7 +15,9 @@ const Torrent = database.define('torrent', type: { type: Sequelize.STRING(16), allowNull: false }, uploadDate: { type: Sequelize.DATE, allowNull: false }, seeders: { type: Sequelize.SMALLINT }, - trackers: { type: Sequelize.STRING(4096) } + trackers: { type: Sequelize.STRING(4096) }, + languages: { type: Sequelize.STRING(256) }, + resolution: { type: Sequelize.STRING(16) } } ); diff --git a/scraper/lib/repository.js b/scraper/lib/repository.js index 7e7e3ee..3cccb62 100644 --- a/scraper/lib/repository.js +++ b/scraper/lib/repository.js @@ -11,17 +11,21 @@ const Provider = database.define('provider', { lastScrapedId: { type: Sequelize.STRING(128) } }); -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 }, - uploadDate: { type: Sequelize.DATE, allowNull: false }, - seeders: { type: Sequelize.SMALLINT }, - trackers: { type: Sequelize.STRING(4096) } -}); +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 }, + uploadDate: { type: Sequelize.DATE, allowNull: false }, + seeders: { type: Sequelize.SMALLINT }, + trackers: { type: Sequelize.STRING(4096) }, + languages: { type: Sequelize.STRING(256) }, + resolution: { type: Sequelize.STRING(16) } + } +); const File = database.define('file', {