diff --git a/src/tools/transfer.js b/src/tools/transfer.js index 84d318f4..24528091 100644 --- a/src/tools/transfer.js +++ b/src/tools/transfer.js @@ -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([]));