mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 01:41:35 +00:00
fix: include episode data in podcast metadata.json
The metadata.json written for podcast libraries only included podcast-level metadata (title, author, description, etc.) but not episode-level data like titles, descriptions, pubDates, and chapters. This meant that when a podcast library was moved or restored from backup, all episode metadata was lost. This change adds an episodes array to the metadata.json output containing the key fields for each episode: title, subtitle, season, number, type, pubDate, publishedAt, description, and chapters. Fixes #5093
This commit is contained in:
parent
e70e4b9d40
commit
03542a540f
1 changed files with 12 additions and 1 deletions
|
|
@ -443,7 +443,18 @@ class PodcastScanner {
|
|||
asin: libraryItem.media.asin,
|
||||
language: libraryItem.media.language,
|
||||
explicit: !!libraryItem.media.explicit,
|
||||
podcastType: libraryItem.media.podcastType
|
||||
podcastType: libraryItem.media.podcastType,
|
||||
episodes: (libraryItem.media.podcastEpisodes || []).map((ep) => ({
|
||||
title: ep.title,
|
||||
subtitle: ep.subtitle,
|
||||
season: ep.season,
|
||||
episode: ep.episode,
|
||||
episodeType: ep.episodeType,
|
||||
pubDate: ep.pubDate,
|
||||
publishedAt: ep.publishedAt,
|
||||
description: ep.description,
|
||||
chapters: ep.chapters || []
|
||||
}))
|
||||
}
|
||||
return fsExtra
|
||||
.writeFile(metadataFilePath, JSON.stringify(jsonObject, null, 2))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue