mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-26 00:29:53 +01:00
Remove downloads folder in metadata dir
This commit is contained in:
parent
14ee17de47
commit
ef954ee68f
@ -119,7 +119,6 @@ class Server {
|
|||||||
await this.purgeMetadata() // Remove metadata folders without library item
|
await this.purgeMetadata() // Remove metadata folders without library item
|
||||||
await this.playbackSessionManager.removeInvalidSessions()
|
await this.playbackSessionManager.removeInvalidSessions()
|
||||||
await this.cacheManager.ensureCachePaths()
|
await this.cacheManager.ensureCachePaths()
|
||||||
await this.abMergeManager.ensureDownloadDirPath()
|
|
||||||
|
|
||||||
await this.backupManager.init()
|
await this.backupManager.init()
|
||||||
await this.logManager.init()
|
await this.logManager.init()
|
||||||
|
@ -15,8 +15,6 @@ class AbMergeManager {
|
|||||||
this.taskManager = taskManager
|
this.taskManager = taskManager
|
||||||
|
|
||||||
this.itemsCacheDir = Path.join(global.MetadataPath, 'cache/items')
|
this.itemsCacheDir = Path.join(global.MetadataPath, 'cache/items')
|
||||||
this.downloadDirPath = Path.join(global.MetadataPath, 'downloads')
|
|
||||||
this.downloadDirPathExist = false
|
|
||||||
|
|
||||||
this.pendingTasks = []
|
this.pendingTasks = []
|
||||||
}
|
}
|
||||||
@ -29,22 +27,6 @@ class AbMergeManager {
|
|||||||
return this.removeTask(task, true)
|
return this.removeTask(task, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
async ensureDownloadDirPath() { // Creates download path if necessary and sets owner and permissions
|
|
||||||
if (this.downloadDirPathExist) return
|
|
||||||
|
|
||||||
var pathCreated = false
|
|
||||||
if (!(await fs.pathExists(this.downloadDirPath))) {
|
|
||||||
await fs.mkdir(this.downloadDirPath)
|
|
||||||
pathCreated = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pathCreated) {
|
|
||||||
await filePerms.setDefault(this.downloadDirPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.downloadDirPathExist = true
|
|
||||||
}
|
|
||||||
|
|
||||||
async startAudiobookMerge(user, libraryItem, options = {}) {
|
async startAudiobookMerge(user, libraryItem, options = {}) {
|
||||||
const task = new Task()
|
const task = new Task()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user