Fix a crash under certain circumstances when updating tags when quick matching.

This commit is contained in:
Nick Thomson 2022-10-03 01:38:52 +01:00
parent 8563bdde74
commit 876badbeea

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)) {