Fix intermittent episode artwork not updating on filters page#5303
Fix intermittent episode artwork not updating on filters page#5303lromero16 wants to merge 1 commit into
Conversation
…back When an episode with embedded artwork is played for the first time, EpisodeFileMetadata extracts and saves the artwork to disk. However, thumbnailStatus on the episode was never updated, so Room never re-emitted, DiffUtil detected no changes, and the filters page ViewHolder was never rebound to show the embedded artwork. Set thumbnailStatus to THUMBNAIL_STATUS_EMBEDDED_AVAILABLE or THUMBNAIL_STATUS_EMBEDDED_NOT_AVAILABLE (once, when still UNKNOWN) so that the database change propagates to the UI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Generated by 🚫 Danger |
geekygecko
left a comment
There was a problem hiding this comment.
Can you please follow the checklist in the PR description template, include screenshots or video, and sign the CLA.
|
@copilot review this |
Code review findings for the PR: Bug found: The original Fix prepared (commit
Note: The push is currently blocked by the |
Description
Fixes #PCDROID-79
Root cause:
PodcastEpisode.thumbnailStatushas three constants —THUMBNAIL_STATUS_UNKNOWN,THUMBNAIL_STATUS_EMBEDDED_AVAILABLE, andTHUMBNAIL_STATUS_EMBEDDED_NOT_AVAILABLE— butPlaybackManager.onMetadataAvailable()never set it. When embedded artwork is extracted from a downloaded audio file during playback and saved to theartworkCacheFileon disk, the episode's DB record was never updated. Because Room didn't re-emit, DiffUtil detected no changes, and the filters page ViewHolder was never rebound to show the newly extracted artwork.Fix: After saving chapters in
onMetadataAvailable(), fetch the episode and setthumbnailStatusto the appropriate value (only once, when stillTHUMBNAIL_STATUS_UNKNOWN). This DB write triggers Room → DiffUtil →onBindViewHolder→bindArtwork()→ Coil loads from the local cache file.Testing Instructions
Screenshots or Screencast
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xmlI have tested any UI changes...