Compare commits

..

No commits in common. "15810333b98c49c6f93a8d9d8945de7277ef259d" and "0e804db1307600434dcfb2766ec0d654ba53cc90" have entirely different histories.

5 changed files with 11 additions and 9 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.138.2",
"version": "1.138.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

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

View File

@ -200,6 +200,8 @@ async function findSourceDuplicates(baseMedias) {
knex('media').whereIn('source_page', extractUrls),
]);
console.log(sourceUrls, existingSourceMedia);
const existingSourceMediaByUrl = itemsByKey(existingSourceMedia, 'source');
const existingExtractMediaByUrl = itemsByKey(existingExtractMedia, 'source_page');
@ -774,12 +776,12 @@ async function flushOrphanedMedia() {
.delete();
await Promise.all(orphanedMedia.map(media => Promise.all([
media.path && fsPromises.unlink(path.join(config.media.path, media.path)).catch(() => { /* probably file not found */ }),
media.thumbnail && fsPromises.unlink(path.join(config.media.path, media.thumbnail)).catch(() => { /* probably file not found */ }),
media.lazy && fsPromises.unlink(path.join(config.media.path, media.lazy)).catch(() => { /* probably file not found */ }),
fsPromises.unlink(path.join(config.media.path, media.path)).catch(() => { /* probably file not found */ }),
fsPromises.unlink(path.join(config.media.path, media.thumbnail)).catch(() => { /* probably file not found */ }),
fsPromises.unlink(path.join(config.media.path, media.lazy)).catch(() => { /* probably file not found */ }),
])));
logger.info(`Removed ${orphanedMedia.length} media files from database and storage`);
logger.info(`Removed ${orphanedMedia.length} media files from database and disk`);
await fsPromises.rmdir(path.join(config.media.path, 'temp'), { recursive: true });

View File

@ -12,8 +12,7 @@ function scrapeAll(scenes, channel) {
release.title = query.cnt('.nice-title');
release.poster = query.img('img.poster');
release.photos = query.q('img.poster', 'data-urls')?.split(' ');
release.teaser = query.video('img.poster', 'data-thumbnail');
release.photos = query.q('img.poster', 'data-urls').split(' ');
if (query.exists('.info')) {
release.date = query.date('.updated', 'MM/DD/YYYY');

View File

@ -3,12 +3,13 @@
async function fetchLatest() {
return [
{
title: 'Hot chick arse fucked',
title: 'Hot chicks arse fucked',
date: new Date(),
},
];
}
module.exports = {
fetchLatest,
};