mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-16 22:31:47 +00:00
coverPath bug fix on external rename
This commit is contained in:
parent
8ccaec3d9f
commit
f8def38321
1 changed files with 4 additions and 7 deletions
|
|
@ -402,14 +402,11 @@ class LibraryItem {
|
|||
this.isInvalid = !this.media.hasMediaEntities
|
||||
|
||||
// If cover path is in item folder, make sure libraryFile exists for it
|
||||
if (this.media.coverPath && this.media.coverPath.startsWith(this.path)) {
|
||||
const lf = this.libraryFiles.find(lf => lf.metadata.path === this.media.coverPath)
|
||||
if (!lf) {
|
||||
if (this.media.coverPath && fs.pathExistsSync(this.media.coverPath) == false) {
|
||||
Logger.warn(`[LibraryItem] Invalid cover path - library file dne "${this.media.coverPath}"`)
|
||||
this.media.updateCover('')
|
||||
hasUpdated = true
|
||||
}
|
||||
}
|
||||
|
||||
if (hasUpdated) {
|
||||
this.setLastScan()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue