Browse Source

fix: bulk updating genres/artists no longer worked

Kristian Vos 1 year ago
parent
commit
6d377a9815
1 changed files with 14 additions and 4 deletions
  1. 14 4
      backend/logic/actions/songs.js

+ 14 - 4
backend/logic/actions/songs.js

@@ -1280,8 +1280,13 @@ export default {
 							next(err);
 							return;
 						}
-						SongsModule.runJob("UPDATE_SONGS", { songIds: songsFound });
-						next();
+						SongsModule.runJob("UPDATE_SONGS", { songIds: songsFound }, this)
+							.then(() => {
+								next();
+							})
+							.catch(err => {
+								next(err);
+							});
 					});
 				}
 			],
@@ -1408,8 +1413,13 @@ export default {
 							next(err);
 							return;
 						}
-						SongsModule.runJob("UPDATE_SONGS", { songIds: songsFound });
-						next();
+						SongsModule.runJob("UPDATE_SONGS", { songIds: songsFound })
+							.then(() => {
+								next();
+							})
+							.catch(err => {
+								next(err);
+							});
 					});
 				}
 			],