Merging improvements.
This commit is contained in:
@@ -339,15 +339,19 @@ async function associateMovieScenes(movies, movieScenes) {
|
||||
},
|
||||
}), {});
|
||||
|
||||
console.log('movies', movies, movieScenes);
|
||||
|
||||
const associations = movies.map((movie) => {
|
||||
if (!movie.scenes) {
|
||||
if (!movie.scenes || !movie.id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log(movie, movie.scenes);
|
||||
|
||||
return movie.scenes.map((scene) => {
|
||||
const movieScene = movieScenesByEntityIdAndEntryId[movie.entity.id]?.[scene.entryId];
|
||||
|
||||
if (movieScene) {
|
||||
if (movieScene?.id) {
|
||||
return {
|
||||
movie_id: movie.id,
|
||||
scene_id: movieScene.id,
|
||||
|
||||
Reference in New Issue
Block a user