Skip to content

Add a download-all action for the Next Up queue (issue #188) - #189

Merged
mapitman merged 2 commits into
mainfrom
feature-188-download-all-queued
Aug 15, 2026
Merged

Add a download-all action for the Next Up queue (issue #188)#189
mapitman merged 2 commits into
mainfrom
feature-188-download-all-queued

Conversation

@mapitman

Copy link
Copy Markdown
Owner

Summary

  • There was no way to bulk-download every episode in Next Up -- each had to be downloaded individually.
  • Adds a download icon to QueueScreen's top bar (shown whenever the queue is non-empty) that starts a download for every queued episode not already downloaded or downloading, via QueueViewModel.downloadAll().
  • Reuses EnclosureDownloadRepository.startDownload, the same helper EpisodeListViewModel.downloadSelected already uses for its own bulk-download action, and shows the same "N downloads started" / "Already downloaded" snackbar feedback strings.

Fixes #188

Test plan

  • ./gradlew assembleDebug testDebugUnitTest lintDebug passes
  • New unit tests QueueViewModelTest.downloadAll_startsDownloadForEveryEligibleQueuedEpisode and downloadAll_noEligibleEpisodes_reportsAlreadyDownloaded
  • Installed debug build on device and confirmed app launches
  • Manually confirm: with several undownloaded episodes in Next Up, tap the new download icon and verify all of them start downloading

Adds a download icon to the queue screen's top bar that starts a
download for every episode currently in Next Up that isn't already
downloaded or downloading, reusing EnclosureDownloadRepository the
same way EpisodeListViewModel's own bulk-download action already does.
Tapping "download all" on a large Next Up queue enqueued dozens of
EnclosureDownloadWorker jobs at once, each firing its HTTP request
immediately and independently -- observed to make most of them fail
(via IOException or a non-2xx response) and retry within about a
second of starting, spread across as many distinct podcast-host CDNs.

Downloads now route through a dedicated OkHttpClient whose Dispatcher
caps concurrent requests at 3, queuing the rest instead of firing them
all at once. The worker also switches from Call.execute() (synchronous,
invisible to the Dispatcher's own limits) to an async await() so that
cap actually takes effect. Confirmed on-device: before, a 30+ episode
burst produced dozens of retries and almost no completions; after,
downloads complete steadily with only occasional individual retries.
@mapitman
mapitman merged commit 77f8c06 into main Aug 15, 2026
1 of 2 checks passed
@mapitman
mapitman deleted the feature-188-download-all-queued branch August 15, 2026 05:47
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.

Add a "download all" action for the Next Up queue

1 participant