mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01: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)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    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)
 | 
			
		||||
    SocketAuthority.emitter('item_removed', libraryItem.toJSONExpanded())
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user