From 46374087d685c5e920342b47c98bb9b11b01c3d5 Mon Sep 17 00:00:00 2001 From: Arunesh Dwivedi Date: Wed, 3 Jun 2026 06:12:54 +0000 Subject: [PATCH] fix: add missing isFile check in PodcastScanner metadata write BookScanner has '&& !existingLibraryItem.isFile' when setting libraryItemUpdated after writing metadata, but PodcastScanner was missing this check. This inconsistency meant podcast items that are files would still try to write metadata, which doesn't make sense since file-type items don't have a directory to store metadata.json in. Aligns PodcastScanner behavior with BookScanner. Fixes #5093 --- server/scanner/PodcastScanner.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/scanner/PodcastScanner.js b/server/scanner/PodcastScanner.js index 72898b661..349f44014 100644 --- a/server/scanner/PodcastScanner.js +++ b/server/scanner/PodcastScanner.js @@ -240,11 +240,7 @@ class PodcastScanner { if (hasMediaChanges) { await media.save() await this.saveMetadataFile(existingLibraryItem, libraryScan) - libraryItemUpdated = global.ServerSettings.storeMetadataWithItem - } else if (global.ServerSettings.storeMetadataWithItem) { - // Always save metadata file when setting is enabled, even without media changes - await this.saveMetadataFile(existingLibraryItem, libraryScan) - libraryItemUpdated = true + libraryItemUpdated = global.ServerSettings.storeMetadataWithItem && !existingLibraryItem.isFile } if (libraryItemUpdated) {