Skip to content

Add episode artwork setting to Android Automotive - #6407

Open
joashrajin wants to merge 14 commits into
mainfrom
claude/episode-artwork-android-automotive-25f37d
Open

joashrajin wants to merge 14 commits into
mainfrom
claude/episode-artwork-android-automotive-25f37d

Conversation

@joashrajin

@joashrajin joashrajin commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a Use episode artwork switch to the Android Automotive settings, under a new Appearance section. Episodes with their own artwork now show it in the car. The switch reuses the existing setting, strings and analytics event.

To make the artwork show reliably in the car:

  • Car lists reload when the setting changes.
  • Episode artwork falls back to the podcast artwork when it can't load.
  • The car waits up to 5 seconds for an episode image that has a fallback, and up to 10 seconds for any other image. A slower download carries on in the background, so the next request gets the image.
  • The car caches artwork by link, so an episode's artwork link is marked as pending until its image is downloaded, and changes once it is. When a slow image arrives, the car's lists and now playing reload, so the podcast artwork shown in the meantime doesn't stick. An image that fails to download on a network error is tried again 30 seconds and 2 minutes later.
  • Now playing updates when an episode's image URL arrives, and it uses artwork embedded in downloaded files.
  • Opening a podcast in the car fetches its show notes once its list has loaded, so episode artwork shows before anything is played, even for a podcast opened from search. A podcast is fetched again after an hour, or 5 minutes after a failed fetch.
  • The artwork provider decodes a thumbnail instead of the full image.
  • Fixes an existing bug where Media3 now-playing updates stopped after the playback service restarted.

Fixes #6305 · Linear: PCDROID-851

Notes for reviewers:

  • Podcast artwork had no time limit before; it now gets 10 seconds, the same as any image without a fallback.
  • EpisodeManager.updateImageUrls now returns Boolean, so Mockito mocks that reach it need a stub.
  • Phones on the older (non-Media3) playback session have no list refresh, so there the episode image appears the next time the list loads.
  • Slow and failing episode images, and the first open from search, were also checked on the Android Automotive emulator, with the image host slowed or stalled through a local proxy. Embedded file artwork is tested in unit tests only.

Testing Instructions

  1. Run :automotive on an Android Automotive emulator (API 34; if boot hangs, start it with -gpu swiftshader_indirect).
  2. Search for "Darknet Diaries" and open it. Every episode shows the podcast artwork.
  3. Open Settings, turn on Appearance → Use episode artwork, then go back. The list reloads with each episode's artwork.
  4. Play an episode. Now playing shows the episode's artwork. Turn the setting off and it switches to the podcast artwork.

Screenshots or Screencast

Before (setting off) and after (setting on), on the Android Automotive 14 emulator:

Settings switch
Settings switch before and after

Episode list reloads with each episode's artwork
Episode list before and after

Now playing shows the episode's artwork
Now playing before and after

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews (N/A)
  • I have updated (or requested that someone edit) the Event Horizon schema to reflect any new or changed analytics. (N/A: existing event)

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

Adds a "Use episode artwork" switch under a new Appearance section in the
Automotive settings, and fills the gaps that kept episode artwork from
showing in the car:

- Browse lists the car is showing reload when the setting changes.
- Episode artwork URIs carry the podcast artwork as a fallback, which the
  content provider serves when the episode image can't be loaded. The
  episode image gets 5 seconds when a fallback exists.
- Now playing refreshes when an episode's image URL arrives, and uses
  embedded file artwork, matching the browse lists.
- The first time the car opens a podcast's episode list, its show notes
  are fetched so episode artwork shows before anything is played.
- The content provider decodes a thumbnail instead of the full image.
- Media3 observers survive a playback service restart.

Fixes #6305
@joashrajin
joashrajin requested a review from a team as a code owner November 13, 2026 12:35
@joashrajin
joashrajin requested review from geekygecko and removed request for a team November 13, 2026 12:35
@claude

claude Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 2m 1s —— View job


I found no blocking problems. I traced these paths and they hold up:

  • The release() change only keeps the Media3 observers, which are subscribed once per process. The legacy observers are still cleared.
  • The custom-layout flow moved to applicationScope, so it survives scope.cancel().
  • The provider's local-path fallback still goes through the app-storage canonicalisation check.
  • getPodcastArtworkUri picks artwork in the same order as before. Only the fallback param is new.

I didn't build the project or run the tests.

Non-blocking

  • modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/playback/BrowseTreeProvider.kt:89: episodes that arrive after the first prefetch keep podcast artwork in the car list until they're played, because a fetched podcast is never refetched while the app runs. Clear its entry when the podcast refreshes, or refetch after a TTL. Add episode artwork setting to Android Automotive #6407 (comment)

@dangermattic

dangermattic commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@joashrajin joashrajin self-assigned this Nov 13, 2026
@joashrajin joashrajin added [Type] Enhancement Improve an existing feature. [Area] Automotive Android Automotive [Area] Artwork labels Nov 13, 2026
A podcast's show notes were fetched once per process for episode artwork,
so episodes that arrived in a later refresh kept the podcast artwork in the
car list until played. Fetch again after an hour, and wait five minutes
before retrying a failed fetch instead of retrying on every list load.
@claude

claude Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 17s —— View job


I reviewed only the new commit, 6450c4b (Refetch car episode artwork after an interval). I found nothing new, and it addresses the earlier non-blocking thread: podcasts are now refetched after an hour, and a failed fetch waits five minutes before it's retried. reserveEpisodeArtworkFetch claims the fetch with compute, so two lists loading at the same time don't fetch the same podcast twice. The injected Clock comes from UtilsModule.provideClock.

I didn't build the project or run the tests.

@joashrajin joashrajin added this to the 8.27 milestone Nov 13, 2026
- Every artwork lookup in the content provider now stops waiting after
  10 seconds, or 5 for an episode image with a fallback. A download that
  misses the limit carries on in the background so the next request gets
  the image. Podcast artwork previously had no limit.
- An exception in the episode artwork lookup no longer skips the fallback.
- The show-notes retry interval is counted from when the fetch failed.
- The Media3 observers subscribe once per process, since release() keeps
  them.
- Tests for the time limits, the fallback after an error, the retry timing
  and the observer guard, plus small cleanups and long-line wrapping.
@claude

claude Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 20s —— View job


I reviewed only the new commit, 72411a9 (Bound car artwork lookups and tidy review follow-ups), and found nothing new. The earlier thread is resolved.

I didn't build the project or run the tests.

The car caches artwork by link, so podcast artwork served while an
episode image was slow or failing stayed on screen after the image
arrived. An episode's artwork link is now marked as pending until its
image is in the provider's disk cache, so the link changes once the
image is downloaded. When a download the provider stopped waiting for
finishes, the car's lists and now playing reload to pick up the new
link. Phones on the older (non-Media3) session have no list refresh, so
they get the new link the next time a list loads.
@claude

claude Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 52s —— View job


I reviewed only the new commit, f00f276 (Change car artwork links once episode images are downloaded), and found no new problems. No earlier threads are still open.

I didn't build the project or run the tests.

A pending episode link only changes once its image is downloaded, so an
image whose download failed kept the podcast artwork in the car. On a
weak connection the download often fails after the provider stops
waiting, when OkHttp's read timeout ends it.

The provider now downloads a failed episode image again 30 seconds and
then 2 minutes later, and the list refreshes when it arrives, as it does
for a late download. Only images behind a pending link are retried, and
only after network errors: an error from the image host, or an image
that can't be decoded, would fail again.
The artwork fetch ran alongside the list load. For a podcast opened from
search, loading the list is what saves the podcast, so the fetch found
nothing and the episode artwork only showed the next time the list
loaded. The fetch now starts after the list loads, and is skipped when
the list fails to load.
@claude

claude Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 24s —— View job


I reviewed only the new commits, 32fa1d1 (Retry car episode images that fail to download) and 036f931 (Fetch car episode artwork once the list has loaded). I found no new problems, and no earlier threads are still open.

I didn't build the project or run the tests.

The instrumented tests job on build 21073 failed, but the app and test
APKs build and all 581 instrumented tests pass locally. This empty
commit starts a new build to rule out a CI problem.
@claude

claude Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 12s —— View job


The only new commit since my last review, 7fa2632 (Rerun CI), is empty and changes no code, so I found nothing new to review. No earlier threads are still open.

@claude

claude Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 35s —— View job


The only new commit since my last review, eadf1fa, merges origin/main. It doesn't touch any of the PR's 27 files, so I found nothing new to review. Main also removed room.ktx, preference.ktx and material from repositories/build.gradle.kts. None of the PR's new imports in that module need them, and the libraries it does use (coil, rx2.relay, okhttp) are still declared. No earlier threads are still open.

I didn't build the project or run the tests.

The Instrumented tests job has failed on every pull request since
2026-11-17, and reading its log needs a Buildkite sign-in. GitHub shows
only the job's exit status, so the job now exits with a code that says
which stage failed: setup, the Gradle build (and whether a rebuild
without the build cache passes), or Firebase Test Lab. The codes are
listed at the top of the script.

This is temporary and gets reverted before merging.
@joashrajin
joashrajin requested a review from a team as a code owner November 18, 2026 08:29
@claude

claude Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 36s —— View job


I reviewed only the new commit, b5bdb33, which adds temporary failure diagnostics to the instrumented-tests CI script. I found no problems in how the script works. The one blocker is that the commit is marked "revert before merging" and is still in the PR. No earlier threads are still open.

Blocking

I didn't run the script, build the project or run the tests.

…it status"

This reverts commit b5bdb33. The diagnostic run exited with 72: the
Gradle build passed, and the Firebase Test Lab stage failed because the
device or Android version the lane asks for (Pixel2.arm, API 30) isn't
available.
@claude

claude Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 12s —— View job


I reviewed only the new commit, 6b444aa, which reverts b5bdb33. .buildkite/commands/run-instrumented-tests.sh is the same as it was before b5bdb33, and the PR's diff against main no longer changes anything under .buildkite. That fixes the earlier blocking thread, and no other threads are still open.

I didn't build the project or run the tests.

Firebase Test Lab retired the Pixel2.arm virtual device on 2026-11-17,
so the Instrumented tests job has failed right after the build on every
pull request since then. MediumPhone.arm is Firebase's replacement for
Pixel 2 at the same API level, so the tests still run on API 30.
@claude

claude Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 13s —— View job


I reviewed only the new commit, 6315b35, which changes the Firebase Test Lab device in fastlane/Fastfile from Pixel2.arm to MediumPhone.arm and keeps API 30. I found no problems, and nothing else in the repo still refers to Pixel2. No earlier threads are still open.

One thing to know: this CI fix is unrelated to the artwork feature, so it reaches main with this PR. Every other PR's instrumented tests keep failing until this PR merges, unless the fix also lands separately.

I didn't run the Firebase job and didn't check that Firebase offers MediumPhone.arm at API 30.

@claude

claude Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 21s —— View job


The only new commit since my last review, 0fd67c6, merges origin/main. The only PR file it touches is CHANGELOG.md, where the new entry sits correctly under 8.26. main now has the MediumPhone.arm Fastfile change, so the CI fix no longer comes in through this PR. Nothing is new to review and no earlier threads are still open.

I didn't build the project or run the tests.

@claude

claude Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 22s —— View job


The only new commit since my last review, 0de5953, merges origin/main. The only PR file it touches is CHANGELOG.md, where the PR's entry now sits under the new 8.27 heading and the 8.26 entries from main stay below it. Main removed no strings, so the setting's strings in preferences_auto.xml are still there. Nothing is new to review and no earlier threads are still open.

I didn't build the project or run the tests.

@claude

claude Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @joashrajin's task in 16s —— View job


The only new commit since my last review, 3575c91, merges origin/main. The only PR file it touches is CHANGELOG.md, where the PR's entry sits under 8.27 next to the tooltip entry from main. The strings main changed are for the episode chat tooltip, not the strings preferences_auto.xml uses. Nothing is new to review and no earlier threads are still open.

I didn't build the project or run the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Artwork [Area] Automotive Android Automotive [Type] Enhancement Improve an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Individual Episode Artwork on Android Automotive?

2 participants