Repository navigation
Load podcast libraries whose podcasts have a free-text release date - #1225
Merged
Merged
Conversation
Audiobookshelf stores a podcast's releaseDate as free text: the web UI saves "" for podcasts added from an RSS URL, OPML imports save "", and admins can type anything. Decoding it as an Instant failed the whole personalized-shelves, library-items and recent-episodes responses, so Home, Shows and Latest never loaded for those libraries. Decode releaseDate as a String, map a blank value to null, and keep sending only ISO-8601 dates when creating a podcast. Closes #1224
Generated by 🚫 Danger Kotlin against 8469d71 |
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack
Podcast libraries could fail to load in the Home, Shows and Latest tabs. Audiobookshelf stores a podcast's release date as free text, and Campfire decoded it as an ISO-8601
Instant. The web UI saves""for podcasts added from an RSS URL, OPML imports save"", and admins can type anything ("2019"). One such podcast throwskotlin.time.InstantFormatException, failing the whole personalized-shelves, library-items or recent-episodes response. Fetch errors with nothing cached are swallowed, so Home keeps the previous library's shelves or spins, and Shows spins with a "--" count.Closes #1224
What changed
PodcastMetadata.releaseDate(data/network/api) is nowString?, matching the server'sSTRINGcolumn.NetworkPodcastMetadata.asDomainModel()(PodcastMapping.kt) maps a blank release date to null. The domain model and DB already held it as aString?.PodcastDraft.asCreateMetadata()(PodcastSearchMapping.kt) still sends only an ISO-8601 release date when creating a podcast, now asInstant.toString(). That is the same wire format theInstantserializer produced.PodcastMetadataTestdecodes a podcast item with a blank or non-ISO release date, standalone and inside a personalized podcast shelf.PodcastMappingTestandPodcastSearchMappingTestcover both mapping changes. This addscommonTestsource sets to:data:db:mappingand:features:podcasts:impl.Verification
main, a test decoding a minified podcast item with"releaseDate": ""failed withkotlin.time.InstantFormatException.NewModal.vue(web RSS add) andPodcastManager.js(OPML import) write''.releaseDate: ""and another to"2019".main: Home kept showing the audiobook shelves, and Shows and Latest stayed empty. Logcat showed decode failures on/personalized,/itemsand/recent-episodes(An empty string is not a valid Instant,The input string is too short ... "2019").""podcast's detail loads with its episodes. Latest loads, and switching back to Audiobooks works. No decode errors in logcat../scripts/ktlint --check,./gradlew --continue jvmTest test, and compiles for:app:desktop:compileKotlin,:app:android:compileAlphaDebugKotlinand:app:ios:compileKotlinIosSimulatorArm64. All pass.:infra:audioplayer:engine-tests:test. Its FFmpeg engine tests can't load the native library on this machine (UnsatisfiedLinkError), and this PR doesn't touch audio code.Follow-ups
An audit of the other podcast models against ABS v2.37.1 found more fields of the same kind:
AudioFileprobe fields that ffprobe can leave null;PodcastEpisode.Enclosure.lengthtypedLong?, though the server sends the feed's raw text;maxEpisodesToKeeptypedInt?, though the server accepts any number;numEpisodes, which is never decoded, so every podcast from a list or shelf is stored with 0 episodes.These come next in their own PR.
🤖 Generated with Claude Code