mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 01:41:35 +00:00
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:
parent
193aa02994
commit
46374087d6
1 changed files with 1 additions and 5 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue