Add setting to hide finished items in CarPlay / Android Auto - #335
Open
KimonoCactus wants to merge 1 commit into
Open
Add setting to hide finished items in CarPlay / Android Auto#335KimonoCactus wants to merge 1 commit into
KimonoCactus wants to merge 1 commit into
Conversation
When enabled (Settings > Hide finished in CarPlay & Android Auto, off by default), browse lists in the car exclude items whose media progress is finished: the library Books buckets, Series and Author drilldowns, podcast episodes, the New tab, Downloads and voice search. The Continue tab is intentionally untouched so a finished book the user re-started stays resumable. Finished keys come from /api/me/progress (cached 5 min), merged with local download progress so the Downloads tab also filters offline. Caches keep unfiltered data and filtering happens at return time, so toggling the setting only invalidates the browse children cache, not the fetched data. The Android Auto series/author fetchers are folded into the existing CarPlay data fetchers (they were duplicates) so both surfaces share the same filtered path.
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.
What
A new setting — Settings → Hide finished in CarPlay & Android Auto (off by default) — that hides items whose media progress is finished from the browse lists in the car: the Library books buckets, Series and Author drilldowns, podcast episodes, the New tab, Downloads and voice search.
Why
When driving and looking for the next book to start, scrolling past dozens of already-finished books is friction exactly where interaction should be minimal. The phone UI already has progress filters for this; the car surfaces had no equivalent. (As far as I can tell no ABS client offers this today — it's the one thing I've been missing in absorb, which otherwise works great.)
Design notes
ScopedPrefs, so it's per account, consistent with progress being per account.GET /api/me/progress(cached 5 min, same TTL as the books cache), merged with local download progress (ProgressSyncService) so the Downloads tab also filters when offline. Keys matchAutoBookEntry.id: item id for books,showId-episodeIdfor podcast episodes._allBooksCache,_childrenCachevalues) keep unfiltered data; filtering happens at return time. Toggling the setting therefore only clears the browse-children cache and re-renders (CarPlay templates refresh via the existingonServerDataChangedhook) — no refetch of the library.AndroidAutoService(the shared data layer), so CarPlay and Android Auto get identical behavior. Along the way I folded the Android Auto series/author fetchers into the existing CarPlay data fetchers — they were line-for-line duplicates.Testing
flutter analyze: no new issues.Happy to adjust naming, placement of the setting, or scope (e.g. also filtering the phone library) if you'd prefer.