mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-17 00:01:10 +02:00
Updates to new library scanner and adding jsdoc types
This commit is contained in:
parent
ea1d051cfb
commit
2c8448d147
10 changed files with 416 additions and 16 deletions
|
@ -64,7 +64,7 @@ class AudioFile {
|
|||
channelLayout: this.channelLayout,
|
||||
chapters: this.chapters,
|
||||
embeddedCoverArt: this.embeddedCoverArt,
|
||||
metaTags: this.metaTags ? this.metaTags.toJSON() : {},
|
||||
metaTags: this.metaTags?.toJSON() || {},
|
||||
mimeType: this.mimeType
|
||||
}
|
||||
}
|
||||
|
@ -163,11 +163,16 @@ class AudioFile {
|
|||
return new AudioFile(this.toJSON())
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {AudioFile} scannedAudioFile
|
||||
* @returns {boolean} true if updates were made
|
||||
*/
|
||||
updateFromScan(scannedAudioFile) {
|
||||
let hasUpdated = false
|
||||
|
||||
const newjson = scannedAudioFile.toJSON()
|
||||
const ignoreKeys = ['manuallyVerified', 'exclude', 'addedAt', 'updatedAt']
|
||||
const ignoreKeys = ['manuallyVerified', 'ctimeMs', 'addedAt', 'updatedAt']
|
||||
|
||||
for (const key in newjson) {
|
||||
if (key === 'metadata') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue