diff --git a/public/img/tags/airtight/lazy/venera_maxima_legalporno.jpeg b/public/img/tags/airtight/lazy/venera_maxima_legalporno.jpeg new file mode 100644 index 00000000..203e50ee Binary files /dev/null and b/public/img/tags/airtight/lazy/venera_maxima_legalporno.jpeg differ diff --git a/public/img/tags/airtight/thumbs/venera_maxima_legalporno.jpeg b/public/img/tags/airtight/thumbs/venera_maxima_legalporno.jpeg new file mode 100644 index 00000000..3bcbb92c Binary files /dev/null and b/public/img/tags/airtight/thumbs/venera_maxima_legalporno.jpeg differ diff --git a/public/img/tags/airtight/venera_maxima_legalporno.jpeg b/public/img/tags/airtight/venera_maxima_legalporno.jpeg new file mode 100644 index 00000000..e5805fbc Binary files /dev/null and b/public/img/tags/airtight/venera_maxima_legalporno.jpeg differ diff --git a/public/img/tags/anal/kira_noir_julesjordan.jpeg b/public/img/tags/anal/kira_noir_julesjordan.jpeg new file mode 100644 index 00000000..253f2175 Binary files /dev/null and b/public/img/tags/anal/kira_noir_julesjordan.jpeg differ diff --git a/public/img/tags/anal/lazy/kira_noir_julesjordan.jpeg b/public/img/tags/anal/lazy/kira_noir_julesjordan.jpeg new file mode 100644 index 00000000..fedf80d1 Binary files /dev/null and b/public/img/tags/anal/lazy/kira_noir_julesjordan.jpeg differ diff --git a/public/img/tags/anal/thumbs/kira_noir_julesjordan.jpeg b/public/img/tags/anal/thumbs/kira_noir_julesjordan.jpeg new file mode 100644 index 00000000..79d81177 Binary files /dev/null and b/public/img/tags/anal/thumbs/kira_noir_julesjordan.jpeg differ diff --git a/public/img/tags/mfm/hazel_moore_legalporno.jpeg b/public/img/tags/mfm/hazel_moore_legalporno.jpeg new file mode 100644 index 00000000..6b63fce3 Binary files /dev/null and b/public/img/tags/mfm/hazel_moore_legalporno.jpeg differ diff --git a/public/img/tags/mfm/lazy/hazel_moore_legalporno.jpeg b/public/img/tags/mfm/lazy/hazel_moore_legalporno.jpeg new file mode 100644 index 00000000..5287899b Binary files /dev/null and b/public/img/tags/mfm/lazy/hazel_moore_legalporno.jpeg differ diff --git a/public/img/tags/mfm/thumbs/hazel_moore_legalporno.jpeg b/public/img/tags/mfm/thumbs/hazel_moore_legalporno.jpeg new file mode 100644 index 00000000..6b56d757 Binary files /dev/null and b/public/img/tags/mfm/thumbs/hazel_moore_legalporno.jpeg differ diff --git a/seeds/04_media.js b/seeds/04_media.js index 5a5967da..2e39a64f 100644 --- a/seeds/04_media.js +++ b/seeds/04_media.js @@ -598,6 +598,7 @@ const tagMedia = [ ['airtight', 7, 'Lana Rhoades in "Gangbang Me 3"', 'hardx'], ['airtight', 6, 'Remy Lacroix in "Ass Worship 14"', 'julesjordan'], ['airtight', 11, 'Malena Nazionale in "Rocco\'s Perverted Secretaries 2: Italian Edition"', 'roccosiffredi'], + ['airtight', 'venera_maxima_legalporno', 'Venera Maxima in LegalPorno SZ2645', 'legalporno'], ['airtight', 1, 'Jynx Maze in "Pump My Ass Full of Cum 3"', 'julesjordan'], ['airtight', 10, 'Asa Akira in "Asa Akira To The Limit"', 'julesjordan'], ['airtight', 8, 'Veronica Leal in SZ2520'], @@ -605,6 +606,7 @@ const tagMedia = [ ['airtight', 5, 'Chloe Amour in "DP Masters 4"', 'julesjordan'], ['airtight', 9, 'Cindy Shine in GP1658'], ['anal', 5, 'Abella Danger', 'hardx'], + ['anal', 'kira_noir_julesjordan', 'Kira Noir in "Kira Noir Opens Her Ass For Manuel"', 'julesjordan'], ['anal', 7, 'Anastasia Brokelyn', 'bangbros'], ['anal', 'jane_wilde_evilangel_2', 'Jane Wilde and Brock Cooper in "The Cock Hungry Chronicles"', 'evilangel'], ['anal', 0, 'Adriana Chechik in "Manuel Creampies Their Asses 3"', 'julesjordan'], @@ -858,6 +860,7 @@ const tagMedia = [ ['mfm', 0, 'Vina Sky in "Jules Jordan\'s Three Ways"', 'julesjordan'], ['mfm', 8, 'Ariana Marie in "DP Masters 7"', 'julesjordan'], ['mfm', 1, 'Lana Rhoades in "Gangbang Me 3"', 'hardx'], + ['mfm', 'hazel_moore_legalporno', 'Hazel Moore', 'legalporno'], ['mfm', 7, 'Rose Valerie', 'eurosexparties'], ['mfm', 6, 'Honey Gold in "Slut Puppies 12"', 'julesjordan'], ['natural-boobs', 1, 'Nia Nacci', 'firstclasspov'], diff --git a/src/store-releases.js b/src/store-releases.js index 75f909de..8396f8d1 100644 --- a/src/store-releases.js +++ b/src/store-releases.js @@ -323,25 +323,21 @@ async function storeScenes(releases) { const duplicateReleasesWithId = attachReleaseIds(duplicateReleases, duplicateReleaseEntries); const releasesWithId = uniqueReleasesWithId.concat(duplicateReleasesWithId); - try { - await knex.raw(` - UPDATE releases - SET url = COALESCE(new.url, releases.url), - date = COALESCE(new.date, releases.date), - title = COALESCE(new.title, releases.title), - description = COALESCE(new.description, releases.description), - duration = COALESCE(new.duration, releases.duration), - deep = new.url IS NOT NULL, - updated_at = NOW() - FROM json_to_recordset(:scenes) - AS new(id int, url text, date timestamptz, title text, description text, duration integer, deep boolean) - WHERE releases.id = new.id; - `, { - scenes: JSON.stringify(duplicateReleasesWithId), - }); - } catch (error) { - console.log(error); - } + const updated = await knex.raw(` + UPDATE releases + SET url = COALESCE(new.url, releases.url), + date = COALESCE(new.date, releases.date), + title = COALESCE(new.title, releases.title), + description = COALESCE(new.description, releases.description), + duration = COALESCE(new.duration, releases.duration), + deep = new.url IS NOT NULL, + updated_at = NOW() + FROM json_to_recordset(:scenes) + AS new(id int, url text, date timestamptz, title text, description text, duration integer, deep boolean) + WHERE releases.id = new.id; + `, { + scenes: JSON.stringify(duplicateReleasesWithId), + }); const [actors] = await Promise.all([ associateActors(releasesWithId, batchId), @@ -359,7 +355,7 @@ async function storeScenes(releases) { await scrapeActors(actors.map(actor => actor.name)); } - logger.info(`Stored ${storedReleaseEntries.length} releases`); + logger.info(`Stored ${storedReleaseEntries.length}, updated ${updated.rowCount} releases`); await notify(releasesWithId); diff --git a/src/updates.js b/src/updates.js index bcf4f299..97ce332e 100644 --- a/src/updates.js +++ b/src/updates.js @@ -51,11 +51,10 @@ async function filterUniqueReleases(releases) { .where('deep', true) // scene is already deep scraped .orWhereNull('date') .orWhereNotIn('date_precision', ['day', 'minute']) // don't worry about scenes without (accurate) dates for now - .orWhere(knex.raw('NOW() - date > INTERVAL \'12 hours\'')) // scene is still upcoming, with a rough offset to wait for the end of the day west of UTC - .orWhere(knex.raw('updated_at - date > INTERVAL \'1 day\'')); // scene was updated after the release date, no updated expected + .orWhere(knex.raw('date > NOW() - INTERVAL \'12 hours\'')) // scene is still upcoming, with a rough offset to wait for the end of the day west of UTC + .orWhere(knex.raw('updated_at - date > INTERVAL \'1 day\'')); // scene was updated after the release date, no updates expected }); - const duplicateReleases = duplicateReleaseEntries.map(release => curateRelease(release)); const duplicateReleasesByEntityIdAndEntryId = duplicateReleases.reduce(mapReleasesToEntityIdAndEntryId, {});