forked from DebaucheryLibrarian/traxxx
Logging index in transfer.
This commit is contained in:
parent
48eeac6d88
commit
c9201430ea
|
@ -612,20 +612,20 @@ async function load() {
|
|||
const tagIdsBySlug = Object.fromEntries(tags.map((tag) => [tag.slug, tag.id]));
|
||||
const studioIdsBySlug = Object.fromEntries(studios.map((studio) => [studio.slug, studio.id]));
|
||||
|
||||
const addedMovies = await releases.filter((release) => release.type === 'movie').reduce(async (chain, release) => {
|
||||
const addedMovies = await releases.filter((release) => release.type === 'movie').reduce(async (chain, release, index, array) => {
|
||||
const acc = await chain;
|
||||
const movie = await addRelease(release, { batchId, tagIdsBySlug, studioIdsBySlug });
|
||||
|
||||
console.log(`Loaded '${movie.entityName}' movie "${movie.title}"`);
|
||||
console.log(`Loaded ${index}/${array} '${movie.entityName}' movie "${movie.title}"`);
|
||||
|
||||
return acc.concat(movie);
|
||||
}, Promise.resolve([]));
|
||||
|
||||
const addedScenes = await releases.filter((release) => release.type === 'release').reduce(async (chain, release) => {
|
||||
const addedScenes = await releases.filter((release) => release.type === 'release').reduce(async (chain, release, index, array) => {
|
||||
const acc = await chain;
|
||||
const scene = await addRelease(release, { batchId, movies: addedMovies, tagIdsBySlug, studioIdsBySlug });
|
||||
|
||||
console.log(`Loaded '${scene.entityName}' scene "${scene.title}"`);
|
||||
console.log(`Loaded ${index}/${array} '${scene.entityName}' scene "${scene.title}"`);
|
||||
|
||||
return acc.concat(!!scene);
|
||||
}, Promise.resolve([]));
|
||||
|
|
Loading…
Reference in New Issue