Compare commits
No commits in common. "7372b560b27f7e51ac80144a05a57d41a71fdc6c" and "c7c62e220d23fe3db01e958d4a640b3aeefc104f" have entirely different histories.
7372b560b2
...
c7c62e220d
|
@ -320,8 +320,6 @@ module.exports = {
|
||||||
},
|
},
|
||||||
media: {
|
media: {
|
||||||
path: './media',
|
path: './media',
|
||||||
maxSize: 1000,
|
|
||||||
quality: 80,
|
|
||||||
thumbnailSize: 320, // width for 16:9 will be exactly 576px
|
thumbnailSize: 320, // width for 16:9 will be exactly 576px
|
||||||
thumbnailQuality: 100,
|
thumbnailQuality: 100,
|
||||||
lazySize: 90,
|
lazySize: 90,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.207.0",
|
"version": "1.206.11",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.207.0",
|
"version": "1.206.11",
|
||||||
"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.207.0",
|
"version": "1.206.11",
|
||||||
"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": {
|
||||||
|
|
16
src/media.js
16
src/media.js
|
@ -345,14 +345,13 @@ async function writeImage(image, media, info, filepath, isProcessed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isProcessed) {
|
||||||
|
// convert to JPEG and write to permanent location
|
||||||
await image
|
await image
|
||||||
.resize({
|
.jpeg()
|
||||||
height: config.media.maxSize,
|
|
||||||
withoutEnlargement: true,
|
|
||||||
})
|
|
||||||
.jpeg({ quality: config.media.quality })
|
|
||||||
.toFile(path.join(config.media.path, filepath));
|
.toFile(path.join(config.media.path, filepath));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function writeThumbnail(image, thumbpath) {
|
async function writeThumbnail(image, thumbpath) {
|
||||||
return image
|
return image
|
||||||
|
@ -417,14 +416,12 @@ async function storeImageFile(media, hashDir, hashSubDir, filename, filedir, fil
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
await writeImage(image, media, info, filepath, isProcessed);
|
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
writeImage(image, media, info, filepath, isProcessed),
|
||||||
writeThumbnail(image, thumbpath),
|
writeThumbnail(image, thumbpath),
|
||||||
writeLazy(image, lazypath),
|
writeLazy(image, lazypath),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/*
|
|
||||||
if (isProcessed) {
|
if (isProcessed) {
|
||||||
// file already stored, remove temporary file
|
// file already stored, remove temporary file
|
||||||
await fsPromises.unlink(media.file.path);
|
await fsPromises.unlink(media.file.path);
|
||||||
|
@ -432,9 +429,6 @@ async function storeImageFile(media, hashDir, hashSubDir, filename, filedir, fil
|
||||||
// image not processed, simply move temporary file to final location
|
// image not processed, simply move temporary file to final location
|
||||||
await fsPromises.rename(media.file.path, path.join(config.media.path, filepath));
|
await fsPromises.rename(media.file.path, path.join(config.media.path, filepath));
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
await fsPromises.unlink(media.file.path);
|
|
||||||
|
|
||||||
if (config.s3.enabled) {
|
if (config.s3.enabled) {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
|
Loading…
Reference in New Issue