mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-25 15:52:26 -04: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.playbackSessionManager.removeInvalidSessions() | ||||
|     await this.cacheManager.ensureCachePaths() | ||||
|     await this.abMergeManager.ensureDownloadDirPath() | ||||
| 
 | ||||
|     await this.backupManager.init() | ||||
|     await this.logManager.init() | ||||
|  | ||||
| @ -15,8 +15,6 @@ class AbMergeManager { | ||||
|     this.taskManager = taskManager | ||||
| 
 | ||||
|     this.itemsCacheDir = Path.join(global.MetadataPath, 'cache/items') | ||||
|     this.downloadDirPath = Path.join(global.MetadataPath, 'downloads') | ||||
|     this.downloadDirPathExist = false | ||||
| 
 | ||||
|     this.pendingTasks = [] | ||||
|   } | ||||
| @ -29,22 +27,6 @@ class AbMergeManager { | ||||
|     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 = {}) { | ||||
|     const task = new Task() | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user