fix: write metadata.json for podcast libraries even without media changes

When storeMetadataWithItem is enabled, the metadata file should be
written for podcast libraries regardless of whether media changes
detected. Previously, saveMetadataFile was only called inside the
hasMediaChanges block, so podcast metadata was never written on
subsequent scans if the media content hadn't changed.

Fixes advplyr/audiobookshelf#5093
This commit is contained in:
Arunesh Dwivedi 2026-06-02 10:46:21 +00:00
parent e70e4b9d40
commit 193aa02994

View file

@ -241,6 +241,10 @@ class PodcastScanner {
await media.save() await media.save()
await this.saveMetadataFile(existingLibraryItem, libraryScan) await this.saveMetadataFile(existingLibraryItem, libraryScan)
libraryItemUpdated = global.ServerSettings.storeMetadataWithItem 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
} }
if (libraryItemUpdated) { if (libraryItemUpdated) {