Skip to content

Multithreaded parallel downloads with auto-scroll and queue UI controls#1885

Open
SirBiggin wants to merge 5 commits into
rmcrackan:masterfrom
SirBiggin:master
Open

Multithreaded parallel downloads with auto-scroll and queue UI controls#1885
SirBiggin wants to merge 5 commits into
rmcrackan:masterfrom
SirBiggin:master

Conversation

@SirBiggin

Copy link
Copy Markdown

Summary

  • Parallel downloads: Download and DeDRM multiple audiobooks simultaneously using a configurable thread pool (defaults to processor count). Uses a HashSet<Task> loop allowing dynamic concurrency changes mid-run.
  • Auto-scroll: The download queue automatically scrolls to keep active downloads in view via a new ScrollToTop method on VirtualFlowControl.
  • UI controls: Added two checkboxes to the Process Queue panel — Auto-scroll and Parallel downloads — alongside the existing Cancel All and DL Limit controls.
  • Thread-safety fix: Fixed InvalidOperationException crash in setLiberatedVisibleMenuItem caused by enumerating GetVisible() on a background thread while parallel downloads modified the collection. Collection is now snapshotted on the UI thread before being passed to Task.Run.
  • TrackedQueue multi-active: Replaced single Current item with an _active list to track multiple simultaneous downloads, while keeping the backward-compatible Current property.
  • Settings: Added AutoScrollQueue (bool) and MaxConcurrentDownloads (int) persistent settings.

Test plan

  • Start multiple downloads and confirm they run in parallel
  • Toggle Parallel downloads checkbox off mid-run and confirm it serializes
  • Toggle Auto-scroll and confirm queue scrolls/stops scrolling to active items
  • Confirm no InvalidOperationException crash during parallel downloads
  • Confirm Cancel All cancels all active downloads
  • Confirm settings persist across restarts

SirBiggin and others added 5 commits June 16, 2026 10:23
# Conflicts:
#	Source/LibationUiBase/ProcessQueue/ProcessQueueViewModel.cs
…l downloads

Snapshot GetVisible() on the UI thread before handing off to Task.Run,
preventing InvalidOperationException when parallel downloads modify the
collection concurrently. Also fix installer script to use 64-bit dotnet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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