Compare commits

..

No commits in common. "8b5eada088207ea06b1c1c88489e51acbb47322f" and "430d7a8cddeee2924c42ad0d6a3c82cbc72f8527" have entirely different histories.

5 changed files with 10 additions and 25 deletions

View File

@ -172,7 +172,6 @@ function photos() {
const photosWithClipPosters = (this.release.photos || []).concat(this.release.caps || []).concat(this.release.scenesPhotos || []).concat(uniqueClipPosters); const photosWithClipPosters = (this.release.photos || []).concat(this.release.caps || []).concat(this.release.scenesPhotos || []).concat(uniqueClipPosters);
if (this.release.trailer || (this.release.teaser && this.release.teaser.mime !== 'image/gif')) { if (this.release.trailer || (this.release.teaser && this.release.teaser.mime !== 'image/gif')) {
// if (this.release.trailer) {
// poster will be on trailer video // poster will be on trailer video
return photosWithClipPosters; return photosWithClipPosters;
} }

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.231.27", "version": "1.231.26",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "traxxx", "name": "traxxx",
"version": "1.231.27", "version": "1.231.26",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@casl/ability": "^5.2.2", "@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.231.27", "version": "1.231.26",
"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": {

View File

@ -426,11 +426,11 @@ async function writeImage(image, media, info, filepath, isProcessed) {
async function writeThumbnail(image, thumbpath) { async function writeThumbnail(image, thumbpath) {
return image return image
.jpeg({ quality: config.media.thumbnailQuality })
.resize({ .resize({
height: config.media.thumbnailSize, height: config.media.thumbnailSize,
withoutEnlargement: true, withoutEnlargement: true,
}) })
.jpeg({ quality: config.media.thumbnailQuality })
.rotate() .rotate()
.toFile(path.join(config.media.path, thumbpath)); .toFile(path.join(config.media.path, thumbpath));
} }
@ -463,7 +463,7 @@ async function storeImageFile(media, hashDir, hashSubDir, filename, filedir, fil
fsPromises.mkdir(path.join(config.media.path, lazydir), { recursive: true }), fsPromises.mkdir(path.join(config.media.path, lazydir), { recursive: true }),
]); ]);
const image = sharp(media.file.path, { pages: ['trailer', 'teaser'].includes(media.role) ? -1 : 1 }); // don't store posters as animation const image = sharp(media.file.path, { pages: -1 });
const isProcessed = media.meta.subtype !== 'jpeg' || media.process; const isProcessed = media.meta.subtype !== 'jpeg' || media.process;
const [info, stats] = await Promise.all([ const [info, stats] = await Promise.all([
@ -490,8 +490,8 @@ async function storeImageFile(media, hashDir, hashSubDir, filename, filedir, fil
await writeImage(image, media, info, filepath, isProcessed); await writeImage(image, media, info, filepath, isProcessed);
await Promise.all([ await Promise.all([
writeThumbnail(image, thumbpath, info), writeThumbnail(image, thumbpath),
writeLazy(image, lazypath, info), writeLazy(image, lazypath),
]); ]);
/* /*
@ -603,11 +603,7 @@ async function storeFile(media, options) {
} catch (error) { } catch (error) {
logger.warn(`Failed to store ${media.src}: ${error.message}`); logger.warn(`Failed to store ${media.src}: ${error.message}`);
try { await fsPromises.unlink(media.file.path);
await fsPromises.unlink(media.file.path);
} catch (unlinkError) {
logger.warn(`Failed to unlink ${media.file.path} from ${media.src}: ${unlinkError.message}`);
}
return null; return null;
} }

View File

@ -1,14 +1,13 @@
'use strict'; 'use strict';
const unprint = require('unprint'); const unprint = require('unprint');
const mime = require('mime');
const http = require('../utils/http'); const http = require('../utils/http');
const qu = require('../utils/qu'); const qu = require('../utils/qu');
const slugify = require('../utils/slugify'); const slugify = require('../utils/slugify');
const { lbsToKg, feetInchesToCm } = require('../utils/convert'); const { lbsToKg, feetInchesToCm } = require('../utils/convert');
const teaserOrder = ['large', 'small', 'mobile', 'mp4', 'jpg']; const teaserOrder = ['large', 'small', 'mobile'];
function scrapeSceneMetadata(data, channel) { function scrapeSceneMetadata(data, channel) {
const release = {}; const release = {};
@ -72,16 +71,7 @@ function scrapeSceneApi(data, channel, parameters) {
avatar: actor.thumb, avatar: actor.thumb,
})) || data.models; })) || data.models;
release.poster = data.trailer_screencap; release.poster = data.trailer_screencap || data.thumb;
if (mime.getType(data.thumb) !== 'image/gif') {
release.teaser = data.thumb;
} else {
release.poster = [
release.poster,
data.thumb,
];
}
release.photos = [ release.photos = [
...data.previews?.full || [], ...data.previews?.full || [],