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
This commit is contained in:
Arunesh Dwivedi 2026-06-03 06:12:54 +00:00
parent 193aa02994
commit 46374087d6

View file

@ -240,11 +240,7 @@ class PodcastScanner {
if (hasMediaChanges) { if (hasMediaChanges) {
await media.save() await media.save()
await this.saveMetadataFile(existingLibraryItem, libraryScan) await this.saveMetadataFile(existingLibraryItem, libraryScan)
libraryItemUpdated = global.ServerSettings.storeMetadataWithItem libraryItemUpdated = global.ServerSettings.storeMetadataWithItem && !existingLibraryItem.isFile
} else if (global.ServerSettings.storeMetadataWithItem) {
// Always save metadata file when setting is enabled, even without media changes
await this.saveMetadataFile(existingLibraryItem, libraryScan)
libraryItemUpdated = true
} }
if (libraryItemUpdated) { if (libraryItemUpdated) {