Skip to content

Feat: auto download continue watching - #2117

Open
Poag wants to merge 6 commits into
edde746:mainfrom
Poag:feature/auto-download-continue-watching
Open

Poag wants to merge 6 commits into
edde746:mainfrom
Poag:feature/auto-download-continue-watching

Conversation

@Poag

@Poag Poag commented Aug 25, 2026 •

Copy link
Copy Markdown

What this does

Adds a Settings toggle that keeps each server's Continue Watching shelf downloaded automatically:

  • New items get queued for download as they show up on the shelf
  • Items get removed once they drop off — unless a manual download or another sync rule still needs them

Instead of bolting on a separate pipeline, this reuses the existing Sync Rule engine as a hidden, system-managed rule per connected server. That means it gets the same queueing, exclusivity-aware deletion, cooldown/network gating, and watch-event triggers for free.

Notable details

  • Widened the debounced watch-event listener to also fire on removedFromContinueWatching, not just watched — otherwise a shrinking rule (item explicitly removed from the shelf) would sit stale until the next periodic pass. progressUpdate is still excluded since it fires on every tick.
  • Capped new downloads to 3 per reconciliation pass. Turning this on with a dozen+ in-progress shows was stalling the app for the better part of a minute on first activation (each queue op does a few sequential awaited round trips for metadata/artwork) — this spreads the initial backfill across passes instead of bursting.

Checklist (per CONTRIBUTING.md)

  • dart format .
  • flutter analyze
  • dart run slang — regenerated strings.g.dart / strings_en.g.dart
  • flutter test — added download_provider_test.dart and sync_rule_executor_test.dart
  • New strings added to en.i18n.json; other locales left with empty values for translators to fill in, per the i18n guidelines

AI-assisted contributions

This PR was AI-assisted using Claude Sonnet 5.

@Poag Poag changed the title Feature/auto download continue watching Feat: auto download continue watching Aug 30, 2026
@Poag
Poag force-pushed the feature/auto-download-continue-watching branch 2 times, most recently from 88f576f to 1572891 Compare September 22, 2026 07:54
@Poag
Poag force-pushed the feature/auto-download-continue-watching branch 2 times, most recently from 0ae85bd to be78762 Compare October 12, 2026 05:51
@Poag
Poag force-pushed the feature/auto-download-continue-watching branch from be78762 to 2733eb4 Compare October 19, 2026 05:49
@Poag
Poag force-pushed the feature/auto-download-continue-watching branch from 2733eb4 to 4dca94f Compare October 26, 2026 05:50
@Poag
Poag force-pushed the feature/auto-download-continue-watching branch from 4dca94f to a7dbe65 Compare November 2, 2026 06:49
@Poag
Poag force-pushed the feature/auto-download-continue-watching branch 2 times, most recently from cfe9723 to b8094c5 Compare November 23, 2026 06:48
Adds a Settings toggle that keeps whatever's on each server's Continue
Watching shelf downloaded: new items are queued as they appear, and
items are removed once they drop off (unless still needed by a manual
download or another sync rule). Implemented as a hidden, system-managed
sync rule per connected server so it reuses the existing Sync Rule
engine's queueing, exclusivity-aware deletion, cooldown/network gating,
and watch-event trigger wiring instead of adding a parallel pipeline.
The debounced watch-event fast path only reacted to `watched` events,
so a rule's targets could shrink (an item explicitly removed from
Continue Watching) without a quick re-run — only the next periodic
pass would notice. Widen the listener to also cover
`removedFromContinueWatching`, the other change type that can shrink a
rule's target set. `progressUpdate` stays excluded since it fires on
every playback tick.
Adopting a freshly-enabled Continue Watching shelf could try to queue
every in-progress show at once — each queue op does several sequential
awaited network round trips (metadata, parent metadata, artwork), so a
shelf with a dozen-plus shows in progress stalled the app for the
better part of a minute on first activation (reported after live
device testing). Cap new downloads to 3 per pass; anything past that
stays untouched (not mistaken for a drop) and gets picked up on the
next pass instead of blocking on one big burst.
Regenerate slang output, pass profileGeneration to _deleteDownload, and
update sync rule executor tests for the new required arguments.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VraKLsJqoSspw2a8bvrCT7
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QxrtCcordMnwc2txSoonvF
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QxrtCZpEsBakzYDbvVuZe9
@Poag
Poag force-pushed the feature/auto-download-continue-watching branch from b8094c5 to 3d7ef50 Compare November 30, 2026 07:08
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.

2 participants