mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-02-05 13:01:12 +01:00
Fix:metadata covers check file exists on scan #239
This commit is contained in:
parent
91018e3c9b
commit
394789d64e
@ -654,9 +654,9 @@ class Audiobook {
|
|||||||
Logger.debug(`[Audiobook] Metadata cover full path set "${this.book.coverFullPath}" for "${this.title}"`)
|
Logger.debug(`[Audiobook] Metadata cover full path set "${this.book.coverFullPath}" for "${this.title}"`)
|
||||||
hasUpdates = true
|
hasUpdates = true
|
||||||
}
|
}
|
||||||
var coverStillExists = imageFiles.find(f => comparePaths(f.fullPath, this.book.coverFullPath))
|
// metadata covers are stored in /<MetadataPath>/books/:id/
|
||||||
if (!coverStillExists) {
|
if (!await fs.pathExists(this.book.coverFullPath)) {
|
||||||
Logger.info(`[Audiobook] Metadata cover "${this.book.cover}" was removed | "${this.title}"`)
|
Logger.info(`[Audiobook] Cover in /metadata for "${this.title}" no longer exists - removing cover paths`)
|
||||||
this.book.removeCover()
|
this.book.removeCover()
|
||||||
hasUpdates = true
|
hasUpdates = true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user