mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-30 18:12:25 -04:00 
			
		
		
		
	Update:Remove item metadata path when removing item #1561
This commit is contained in:
		
							parent
							
								
									eb5f257b8c
								
							
						
					
					
						commit
						e4961feffb
					
				| @ -410,6 +410,12 @@ class ApiRouter { | |||||||
|       await this.cacheManager.purgeCoverCache(libraryItem.id) |       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) |     await this.db.removeLibraryItem(libraryItem.id) | ||||||
|     SocketAuthority.emitter('item_removed', libraryItem.toJSONExpanded()) |     SocketAuthority.emitter('item_removed', libraryItem.toJSONExpanded()) | ||||||
|   } |   } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user