mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-12 18:35:00 +02:00
New data model save covers, scanner, new api routes
This commit is contained in:
parent
5f4e5cd3d8
commit
73257188f6
37 changed files with 1649 additions and 672 deletions
|
@ -42,11 +42,11 @@ class CacheManager {
|
|||
readStream.pipe(res)
|
||||
}
|
||||
|
||||
async purgeCoverCache(audiobookId) {
|
||||
async purgeCoverCache(libraryItemId) {
|
||||
// If purgeAll has been called... The cover cache directory no longer exists
|
||||
await fs.ensureDir(this.CoverCachePath)
|
||||
return Promise.all((await fs.readdir(this.CoverCachePath)).reduce((promises, file) => {
|
||||
if (file.startsWith(audiobookId)) {
|
||||
if (file.startsWith(libraryItemId)) {
|
||||
Logger.debug(`[CacheManager] Going to purge ${file}`);
|
||||
promises.push(this.removeCache(Path.join(this.CoverCachePath, file)))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue