forked from DebaucheryLibrarian/traxxx
Catching media storage errors to prevent full crash.
This commit is contained in:
parent
c9b774c498
commit
688863d16e
|
@ -731,6 +731,7 @@ async function associateReleaseMedia(releases, type = 'release') {
|
|||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const storedMedias = await storeMedias(baseMedias);
|
||||
const storedMediasById = itemsByKey(storedMedias, 'id');
|
||||
|
||||
|
@ -755,6 +756,9 @@ async function associateReleaseMedia(releases, type = 'release') {
|
|||
if (associations.length > 0) {
|
||||
await bulkInsert(`${type}s_${role}`, associations, false);
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error(`Failed to store ${type} ${role}: ${error.message}`);
|
||||
}
|
||||
}, Promise.resolve());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue