mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-10 01:15:06 +02:00
Lazy bookshelf finalized
This commit is contained in:
parent
5c92aef048
commit
1ef9a689bc
53 changed files with 914 additions and 795 deletions
|
@ -149,13 +149,13 @@ class Scanner {
|
|||
if (!audiobookData.audioFiles.length && !ebookFiles.length) {
|
||||
Logger.error(`[Scanner] "${existingAudiobook.title}" no valid book files found - marking as incomplete`)
|
||||
existingAudiobook.setLastScan(version)
|
||||
existingAudiobook.isIncomplete = true
|
||||
existingAudiobook.isInvalid = true
|
||||
await this.db.updateAudiobook(existingAudiobook)
|
||||
this.emitter('audiobook_updated', existingAudiobook.toJSONMinified())
|
||||
return ScanResult.UPDATED
|
||||
} else if (existingAudiobook.isIncomplete) { // Was incomplete but now is not
|
||||
} else if (existingAudiobook.isInvalid) { // Was incomplete but now is not
|
||||
Logger.info(`[Scanner] "${existingAudiobook.title}" was incomplete but now has book files`)
|
||||
existingAudiobook.isIncomplete = false
|
||||
existingAudiobook.isInvalid = false
|
||||
}
|
||||
|
||||
// Check for audio files that were removed
|
||||
|
@ -241,7 +241,7 @@ class Scanner {
|
|||
if (!existingAudiobook.tracks.length && !ebookFiles.length) {
|
||||
Logger.error(`[Scanner] "${existingAudiobook.title}" no valid book files found after update - marking as incomplete`)
|
||||
existingAudiobook.setLastScan(version)
|
||||
existingAudiobook.isIncomplete = true
|
||||
existingAudiobook.isInvalid = true
|
||||
await this.db.updateAudiobook(existingAudiobook)
|
||||
this.emitter('audiobook_updated', existingAudiobook.toJSONMinified())
|
||||
return ScanResult.UPDATED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue