Fix playback identity and episode resume state#147
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2e7753f76
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| val stableParentId = resumeItem.parentSeriesId?.takeUnless { it.isBlank() } | ||
| if (!stableParentId.isNullOrBlank()) { | ||
| contentRepository.findSeriesItemById(stableParentId, authConfig) | ||
| } else { |
There was a problem hiding this comment.
Fall back when parent-ID lookup misses
When parentSeriesId is present, this path only calls findSeriesItemById, which reads the cached SERIES index and can return null when that index is missing/stale (it does not fetch remotely). In that case the series card cannot open and the UI falls into the “Unable to open series details” path, even though a title-based search could still resolve the parent. This regresses first-open behavior for continue-watching series episodes that have parentSeriesId but no local index yet.
Useful? React with 👍 / 👎.
| ?: resolvedParentsSnapshot[entry.key]?.streamId?.takeUnless { it.isBlank() } | ||
| ?: resolvedParentsSnapshot[entry.key]?.id?.takeUnless { it.isBlank() } |
There was a problem hiding this comment.
Use matching keys for resolved-parent grouping
displayGroupingKey looks up resolvedParentsSnapshot[entry.key], but resolvedParents is populated with displayEntries keys (groupKey, e.g. series:...), not raw repository keys. Because these key spaces differ, the lookup never hits, so resolved parents are never applied during regrouping and legacy series episodes without embedded parent metadata remain split into multiple cards instead of collapsing.
Useful? React with 👍 / 👎.
Summary
Verification
rtk ./gradlew :app:compileDebugKotlinNotes