Transfer tool finds existing media by source.

This commit is contained in:
DebaucheryLibrarian 2023-06-04 01:24:18 +02:00
parent 84c59bd05a
commit 18e91d54f1
1 changed files with 1 additions and 0 deletions

View File

@ -455,6 +455,7 @@ async function addReleaseMedia(medias, release, target) {
const existingMedia = await knex('media')
.where('hash', media.hash)
.orWhere('source', media.source)
.first();
const id = existingMedia?.id || nanoid();