mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-03-01 00:15:54 +01:00
Change: CacheManager use ensureDir
This commit is contained in:
parent
8be08882d8
commit
ccdc3d60c4
@ -23,21 +23,10 @@ class CacheManager {
|
|||||||
this.ImageCachePath = Path.join(this.CachePath, 'images')
|
this.ImageCachePath = Path.join(this.CachePath, 'images')
|
||||||
this.ItemCachePath = Path.join(this.CachePath, 'items')
|
this.ItemCachePath = Path.join(this.CachePath, 'items')
|
||||||
|
|
||||||
if (!(await fs.pathExists(this.CachePath))) {
|
await fs.ensureDir(this.CachePath)
|
||||||
await fs.mkdir(this.CachePath)
|
await fs.ensureDir(this.CoverCachePath)
|
||||||
}
|
await fs.ensureDir(this.ImageCachePath)
|
||||||
|
await fs.ensureDir(this.ItemCachePath)
|
||||||
if (!(await fs.pathExists(this.CoverCachePath))) {
|
|
||||||
await fs.mkdir(this.CoverCachePath)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(await fs.pathExists(this.ImageCachePath))) {
|
|
||||||
await fs.mkdir(this.ImageCachePath)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(await fs.pathExists(this.ItemCachePath))) {
|
|
||||||
await fs.mkdir(this.ItemCachePath)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async handleCoverCache(res, libraryItemId, coverPath, options = {}) {
|
async handleCoverCache(res, libraryItemId, coverPath, options = {}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user