Fix disc/track metadata mapping

This commit is contained in:
advplyr 2023-01-06 17:39:15 -06:00
parent 878330b4fb
commit 3e4b1652fc
2 changed files with 5 additions and 4 deletions

View File

@ -80,7 +80,7 @@
</div>
<div v-if="musicTrackPretty" class="flex py-0.5">
<div class="w-32">
<span class="text-white text-opacity-60 uppercase text-sm">Track #</span>
<span class="text-white text-opacity-60 uppercase text-sm">Track</span>
</div>
<div>
{{ musicTrackPretty }}
@ -88,7 +88,7 @@
</div>
<div v-if="musicDiscPretty" class="flex py-0.5">
<div class="w-32">
<span class="text-white text-opacity-60 uppercase text-sm">Disc #</span>
<span class="text-white text-opacity-60 uppercase text-sm">Disc</span>
</div>
<div>
{{ musicDiscPretty }}

View File

@ -290,14 +290,15 @@ class MusicMetadata {
// Metadata is only mapped to the music track if it is empty
MetadataMapArray.forEach((mapping) => {
let value = audioFileMetaTags[mapping.tag]
// let tagToUse = mapping.tag
if (!value && mapping.altTag) {
value = audioFileMetaTags[mapping.altTag]
// tagToUse = mapping.altTag
}
if (value && typeof value === 'string') {
value = value.trim() // Trim whitespace
if (value && (typeof value === 'string' || typeof value === 'number')) {
value = value.toString().trim() // Trim whitespace
if (mapping.key === 'artists' && (!this.artists.length || overrideExistingDetails)) {
updatePayload.artists = this.parseArtistsTag(value)