Compare commits
No commits in common. "605242b399198299288ad73f6edb89f0ddb721df" and "0ad64ef5f4907f23099837ab5b949ffe7402b7c2" have entirely different histories.
605242b399
...
0ad64ef5f4
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "traxxx",
|
||||
"version": "1.204.2",
|
||||
"version": "1.204.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "traxxx",
|
||||
"version": "1.204.2",
|
||||
"version": "1.204.1",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@casl/ability": "^5.2.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "traxxx",
|
||||
"version": "1.204.2",
|
||||
"version": "1.204.1",
|
||||
"description": "All the latest porn releases in one place",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -38,12 +38,12 @@ async function snapshotMemory() {
|
|||
const profile = await inspector.heap.takeSnapshot();
|
||||
const filepath = `traxxx_snapshot_${dayjs().format('YYYY-MM-DD_HH-mm-ss')}.heapprofile`;
|
||||
|
||||
logger.info(`Starting heap snapshot, memory usage: ${process.memoryUsage.rss() / 1000000} MB`);
|
||||
logger.info(`Start heap snapshots, memory usage: ${process.memoryUsage.rss() / 1000000} MB`);
|
||||
|
||||
await inspector.heap.disable();
|
||||
await fs.writeFile(filepath, JSON.stringify(profile));
|
||||
|
||||
logger.info(`Saved heap snapshot to ${filepath}`);
|
||||
logger.info(`Saved heap dump to ${filepath}`);
|
||||
}
|
||||
|
||||
async function stopMemorySample(snapshotTriggers) {
|
||||
|
|
|
@ -581,7 +581,6 @@ async function fetchSource(source, baseMedia) {
|
|||
const maxAttempts = source.attempts || 3;
|
||||
|
||||
logger.silly(`Fetching media from ${source.src}`);
|
||||
logger.debug(`Memory usage before media fetch: ${process.memoryUsage.rss() / 1000000} MB (${source.src})`);
|
||||
|
||||
async function attempt(attempts = 1) {
|
||||
const hasher = new blake2.Hash('blake2b', { digestLength: 24 });
|
||||
|
|
|
@ -177,10 +177,10 @@ async function getThumbs(entryId, site, parameters) {
|
|||
});
|
||||
|
||||
if (res.ok && res.body.results?.[0]?.hits[0]?.set_pictures) {
|
||||
return res.body.results[0].hits[0].set_pictures.map((img) => img.thumb_path && ([
|
||||
return res.body.results[0].hits[0].set_pictures.map((img) => ([
|
||||
`https://transform.gammacdn.com/photo_set${img.thumb_path}`,
|
||||
`https://images-evilangel.gammacdn.com/photo_set${img.thumb_path}`,
|
||||
])).filter(Boolean);
|
||||
]));
|
||||
}
|
||||
|
||||
return [];
|
||||
|
@ -410,14 +410,10 @@ async function scrapeSceneApi(data, site, options) {
|
|||
|
||||
if (data.pictures) {
|
||||
release.poster = [
|
||||
...(data.pictures['1920x1080'] ? [
|
||||
`https://transform.gammacdn.com/movies${data.pictures['1920x1080']}`,
|
||||
`https://images-evilangel.gammacdn.com/movies${data.pictures['1920x1080']}`,
|
||||
] : []),
|
||||
...(data.pictures.resized ? [
|
||||
`https://transform.gammacdn.com/movies${data.pictures.resized}`,
|
||||
`https://images-evilangel.gammacdn.com/movies${data.pictures.resized}`,
|
||||
] : []),
|
||||
`https://transform.gammacdn.com/movies${data.pictures['1920x1080']}`,
|
||||
`https://images-evilangel.gammacdn.com/movies${data.pictures['1920x1080']}`,
|
||||
`https://transform.gammacdn.com/movies${data.pictures.resized}`,
|
||||
`https://images-evilangel.gammacdn.com/movies${data.pictures.resized}`,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -499,6 +495,8 @@ async function scrapeMovie({ query, el }, url, entity, baseRelease, options) {
|
|||
release.trailer = await fetchMovieTrailer(release);
|
||||
}
|
||||
|
||||
console.log(release);
|
||||
|
||||
return release;
|
||||
}
|
||||
|
||||
|
|
|
@ -140,6 +140,16 @@ async function fetchLatest(site, page = 1) {
|
|||
return res.status;
|
||||
}
|
||||
|
||||
async function fetchScene(url, site) {
|
||||
const res = await qu.get(url);
|
||||
|
||||
if (res.ok) {
|
||||
return scrapeScene(res.item, url, site);
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
async function fetchProfile({ name: actorName }, entity, include) {
|
||||
const searchRes = await qu.getAll(`https://kink.com/search?type=performers&q=${actorName}`, '.model');
|
||||
|
||||
|
@ -166,6 +176,6 @@ async function fetchProfile({ name: actorName }, entity, include) {
|
|||
|
||||
module.exports = {
|
||||
fetchLatest,
|
||||
fetchScene,
|
||||
fetchProfile,
|
||||
scrapeScene,
|
||||
};
|
||||
|
|
|
@ -249,8 +249,7 @@ async function fetchLatest(entity, page, options) {
|
|||
.where('is_sfw', true)
|
||||
.pluck('path')
|
||||
.orderByRaw('random()')
|
||||
// .limit(Math.floor(Math.random() * 10) + 1)
|
||||
.limit(100);
|
||||
.limit(Math.floor(Math.random() * 10) + 1);
|
||||
|
||||
// const poster = 'sfw/kittens/thumbs/iNEXVlX-RLs.jpeg';
|
||||
|
||||
|
|
Loading…
Reference in New Issue