Updated dependencies. Added periodic memory logger.

This commit is contained in:
DebaucheryLibrarian
2021-11-20 23:59:15 +01:00
parent a867817dc1
commit 26539b74a5
109 changed files with 10238 additions and 10833 deletions

View File

@@ -142,7 +142,7 @@ function curateRelease(release, withMedia = false, withPoster = true) {
slug: release.parent.slug,
},
},
actors: (release.actors || []).map(actor => ({
actors: (release.actors || []).map((actor) => ({
id: actor.id,
name: actor.name,
slug: actor.slug,
@@ -150,12 +150,12 @@ function curateRelease(release, withMedia = false, withPoster = true) {
entityId: actor.entity_id,
aliasFor: actor.alias_for,
})),
tags: (release.tags || []).map(tag => ({
tags: (release.tags || []).map((tag) => ({
id: tag.id,
name: tag.name,
slug: tag.slug,
})),
chapters: (release.chapters || []).map(chapter => ({
chapters: (release.chapters || []).map((chapter) => ({
id: chapter.id,
index: chapter.index,
time: chapter.time,
@@ -174,7 +174,7 @@ function curateRelease(release, withMedia = false, withPoster = true) {
} : null,
}),
...(withMedia && {
photos: (release.photos || []).map(photo => ({
photos: (release.photos || []).map((photo) => ({
id: photo.id,
path: photo.path,
thumbnail: release.poster.thumbnail,
@@ -207,16 +207,16 @@ function curateGraphqlRelease(release) {
description: release.description || null,
duration: release.duration,
entity: release.entity,
actors: release.actors.map(actor => actor.actor),
tags: release.tags.map(tag => tag.tag),
...(release.chapters && { chapters: release.chapters.map(chapter => ({
actors: release.actors.map((actor) => actor.actor),
tags: release.tags.map((tag) => tag.tag),
...(release.chapters && { chapters: release.chapters.map((chapter) => ({
...chapter,
tags: chapter.tags.map(tag => tag.tag),
tags: chapter.tags.map((tag) => tag.tag),
poster: chapter.poster?.media || null,
photos: chapter.photos.map(photo => photo.media),
photos: chapter.photos.map((photo) => photo.media),
})) }),
poster: release.poster?.media || null,
...(release.photos && { photos: release.photos.map(photo => photo.media) }),
...(release.photos && { photos: release.photos.map((photo) => photo.media) }),
trailer: release.trailer?.media || null,
createdAt: release.createdAt,
};
@@ -256,7 +256,7 @@ async function fetchScenes(limit = 100) {
limit: Math.min(limit, 10000),
});
return releases.map(release => curateGraphqlRelease(release));
return releases.map((release) => curateGraphqlRelease(release));
}
async function searchScenes(query, limit = 100, relevance = 0) {
@@ -289,7 +289,7 @@ async function searchScenes(query, limit = 100, relevance = 0) {
relevance,
});
return releases.map(release => curateGraphqlRelease({ ...release.release, relevance: release.rank }));
return releases.map((release) => curateGraphqlRelease({ ...release.release, relevance: release.rank }));
}
async function deleteScenes(sceneIds) {