Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian dda72701f6 1.244.91 2025-12-28 06:24:10 +01:00
DebaucheryLibrarian 6096d1a811 Fixed Kink scraper returning duration as float. 2025-12-28 06:24:07 +01:00
4 changed files with 5 additions and 5 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "traxxx",
"version": "1.244.90",
"version": "1.244.91",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "traxxx",
"version": "1.244.90",
"version": "1.244.91",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-s3": "^3.458.0",

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.244.90",
"version": "1.244.91",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -94,7 +94,7 @@ function scrapeScene({ query }, url, entity) {
release.date = query.date('.shoot-detail-legend', 'MMM D, YYYY');
release.duration = data?.duration
? data.duration / 1000
? Math.round(data.duration / 1000) // duration actually accurate down to the millisecond, not rounded to the nearest thousand
: query.duration('#shootPage .clock');
release.actors = query.elements('#shootPage h1 + span a[href*="/model"]').map((actorEl) => ({

View File

@ -68,7 +68,7 @@ async function curateReleaseEntry(release, batchId, existingRelease, type = 'sce
if (type === 'scene') {
curatedRelease.shoot_id = release.shootId || null;
curatedRelease.production_date = Number(release.productionDate) ? release.productionDate : null;
curatedRelease.duration = Number(release.duration) || null;
curatedRelease.duration = Math.round(release.duration) || null; // float may happen if scraper converts duration from milliseconds with a simple / 1000
curatedRelease.qualities = Array.from(new Set(release.qualities?.map(Number).filter(Boolean))).sort((qualityA, qualityB) => qualityB - qualityA);
}