mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-14 07:49:37 +00:00
Fix disc/track metadata mapping
This commit is contained in:
parent
878330b4fb
commit
3e4b1652fc
2 changed files with 5 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue