mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-14 19:34:57 +02:00
Update:Remove item metadata path when removing item #1561
This commit is contained in:
parent
eb5f257b8c
commit
e4961feffb
1 changed files with 6 additions and 0 deletions
|
@ -410,6 +410,12 @@ class ApiRouter {
|
|||
await this.cacheManager.purgeCoverCache(libraryItem.id)
|
||||
}
|
||||
|
||||
const itemMetadataPath = Path.join(global.MetadataPath, 'items', libraryItem.id)
|
||||
if (await fs.pathExists(itemMetadataPath)) {
|
||||
Logger.debug(`[ApiRouter] Removing item metadata path "${itemMetadataPath}"`)
|
||||
await fs.remove(itemMetadataPath)
|
||||
}
|
||||
|
||||
await this.db.removeLibraryItem(libraryItem.id)
|
||||
SocketAuthority.emitter('item_removed', libraryItem.toJSONExpanded())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue