Skip to content

Add setting to hide finished items in CarPlay / Android Auto - #335

Open
KimonoCactus wants to merge 1 commit into
pounat:mainfrom
KimonoCactus:hide-finished-in-car
Open

Add setting to hide finished items in CarPlay / Android Auto#335
KimonoCactus wants to merge 1 commit into
pounat:mainfrom
KimonoCactus:hide-finished-in-car

Conversation

@KimonoCactus

Copy link
Copy Markdown

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

  • The Continue tab is intentionally not filtered: a finished book the user re-started must stay resumable from the car. (It already has its own inclusion logic.)
  • The setting is stored via ScopedPrefs, so it's per account, consistent with progress being per account.
  • Finished keys come from 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 match AutoBookEntry.id: item id for books, showId-episodeId for podcast episodes.
  • Caches (_allBooksCache, _childrenCache values) 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 existing onServerDataChanged hook) — no refetch of the library.
  • Filtering lives in 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.
  • Manually verified in the CarPlay simulator against a real Audiobookshelf server: finished books disappear from Books/Series/Authors when the toggle is enabled, reappear when disabled, Continue unaffected; toggle updates the CarPlay templates live.
  • l10n: the three new keys are English-only in the other locales, matching the existing pattern (Crowdin).

Happy to adjust naming, placement of the setting, or scope (e.g. also filtering the phone library) if you'd prefer.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant