Compare commits
2 Commits
421e8d0763
...
48eeac6d88
Author | SHA1 | Date |
---|---|---|
|
48eeac6d88 | |
|
a4c82a377b |
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.226.5",
|
"version": "1.226.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.226.5",
|
"version": "1.226.6",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@casl/ability": "^5.2.2",
|
"@casl/ability": "^5.2.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.226.5",
|
"version": "1.226.6",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -509,6 +509,7 @@ async function linkMovieScenes(release, context) {
|
||||||
|
|
||||||
async function addRelease(release, context) {
|
async function addRelease(release, context) {
|
||||||
const existingRelease = await knex(`${release.type}s`)
|
const existingRelease = await knex(`${release.type}s`)
|
||||||
|
.select(`${release.type}s.*`, 'entities.name as entity_name')
|
||||||
.leftJoin('entities', 'entities.id', `${release.type}s.entity_id`)
|
.leftJoin('entities', 'entities.id', `${release.type}s.entity_id`)
|
||||||
.where('entry_id', release.entryId)
|
.where('entry_id', release.entryId)
|
||||||
.where('entities.slug', release.entity.slug)
|
.where('entities.slug', release.entity.slug)
|
||||||
|
@ -517,7 +518,12 @@ async function addRelease(release, context) {
|
||||||
|
|
||||||
if (existingRelease) {
|
if (existingRelease) {
|
||||||
console.log(`Skipping ${release.entity.slug} release "${release.title}", already in database`);
|
console.log(`Skipping ${release.entity.slug} release "${release.title}", already in database`);
|
||||||
return false;
|
|
||||||
|
return {
|
||||||
|
...release,
|
||||||
|
id: existingRelease.id,
|
||||||
|
entityName: existingRelease.entity_name,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const [entity] = await Promise.all([
|
const [entity] = await Promise.all([
|
||||||
|
@ -552,7 +558,6 @@ async function addRelease(release, context) {
|
||||||
const releaseWithId = {
|
const releaseWithId = {
|
||||||
...release,
|
...release,
|
||||||
id: releaseEntry.id,
|
id: releaseEntry.id,
|
||||||
entityId: entity.id,
|
|
||||||
entityName: entity.name,
|
entityName: entity.name,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue