Merge pull request #1031 from Undergrid/Issue_1030

Fix a crash under certain circumstances when updating tags when quick… (Issue #1030)
This commit is contained in:
advplyr 2022-10-03 09:50:12 -05:00 committed by GitHub
commit dc779a3fc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -819,7 +819,7 @@ class Scanner {
if ((!libraryItem.media.tags.length || options.overrideDetails)) { if ((!libraryItem.media.tags.length || options.overrideDetails)) {
var tagsArray = [] var tagsArray = []
if (Array.isArray(matchData[key])) tagsArray = [...matchData[key]] if (Array.isArray(matchData[key])) tagsArray = [...matchData[key]]
else tagsArray = tagsArray[key].split(',').map(v => v.trim()).filter(v => !!v) else tagsArray = matchData[key].split(',').map(v => v.trim()).filter(v => !!v)
updatePayload[key] = tagsArray updatePayload[key] = tagsArray
} }
} else if ((!libraryItem.media.metadata[key] || options.overrideDetails)) { } else if ((!libraryItem.media.metadata[key] || options.overrideDetails)) {