mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-26 02:39:05 +02:00
Update scanner, music meta tags and fix issue with force update
This commit is contained in:
parent
5410aae8fc
commit
9de7be1cb4
11 changed files with 388 additions and 110 deletions
|
@ -131,7 +131,7 @@ class AudioFile {
|
|||
this.channels = probeData.channels
|
||||
this.channelLayout = probeData.channelLayout
|
||||
this.chapters = probeData.chapters || []
|
||||
this.metaTags = probeData.audioFileMetadata
|
||||
this.metaTags = probeData.audioMetaTags
|
||||
this.embeddedCoverArt = probeData.embeddedCoverArt
|
||||
}
|
||||
|
||||
|
@ -167,9 +167,7 @@ class AudioFile {
|
|||
let hasUpdated = false
|
||||
|
||||
const newjson = scannedAudioFile.toJSON()
|
||||
if (this.manuallyVerified) newjson.manuallyVerified = true
|
||||
if (this.exclude) newjson.exclude = true
|
||||
newjson.addedAt = this.addedAt
|
||||
const ignoreKeys = ['manuallyVerified', 'exclude', 'addedAt', 'updatedAt']
|
||||
|
||||
for (const key in newjson) {
|
||||
if (key === 'metadata') {
|
||||
|
@ -185,7 +183,7 @@ class AudioFile {
|
|||
if (this.syncChapters(newjson.chapters || [])) {
|
||||
hasUpdated = true
|
||||
}
|
||||
} else if (this[key] !== newjson[key]) {
|
||||
} else if (!ignoreKeys.includes(key) && this[key] !== newjson[key]) {
|
||||
this[key] = newjson[key]
|
||||
hasUpdated = true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue