mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-12 18:35:00 +02:00
New data model scanner update and change scan chunks to be based on total file size
This commit is contained in:
parent
14a8f84446
commit
f00b120e96
6 changed files with 94 additions and 36 deletions
|
@ -141,6 +141,11 @@ class LibraryItem {
|
|||
this.libraryFiles.forEach((lf) => total += lf.metadata.size)
|
||||
return total
|
||||
}
|
||||
get audioFileTotalSize() {
|
||||
var total = 0
|
||||
this.libraryFiles.filter(lf => lf.fileType == 'audio').forEach((lf) => total += lf.metadata.size)
|
||||
return total
|
||||
}
|
||||
get hasAudioFiles() {
|
||||
return this.libraryFiles.some(lf => lf.fileType === 'audio')
|
||||
}
|
||||
|
@ -347,7 +352,9 @@ class LibraryItem {
|
|||
return true
|
||||
})
|
||||
if (filesRemoved.length) {
|
||||
this.media.checkUpdateMissingTracks()
|
||||
if (this.media.audiobooks && this.media.audiobooks.length) {
|
||||
this.media.audiobooks.forEach(ab => ab.checkUpdateMissingTracks())
|
||||
}
|
||||
hasUpdated = true
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue