Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
54cbf6a
fix: remove cancelled segmented partials off GTK
Linuxuser67 Oct 25, 2026
8088f42
fix: move pump filesystem work off GTK
Linuxuser67 Oct 25, 2026
a1c9d2e
perf: serialize queue snapshots off GTK
Linuxuser67 Oct 25, 2026
ce0c05a
fix: keep synchronous shutdown fallback nonblocking
Linuxuser67 Oct 25, 2026
5d924e6
perf: prepare download destinations off GTK
Linuxuser67 Oct 25, 2026
d487ea1
fix: complete async spawn preparation refactor
Linuxuser67 Oct 25, 2026
c2823ee
perf: move download intake filesystem work off GTK
Linuxuser67 Oct 25, 2026
e5bc4ae
refactor: enqueue media imports asynchronously
Linuxuser67 Oct 25, 2026
605aa71
refactor: await async enqueue from UI and file handlers
Linuxuser67 Oct 25, 2026
3c3e662
test: exercise async intake APIs and guard playlist cancellation
Linuxuser67 Oct 25, 2026
94ee174
fix: close async cancel cleanup helper
Linuxuser67 Oct 25, 2026
1ef3dcc
style: apply rustfmt to async filesystem changes
Linuxuser67 Oct 25, 2026
937d59a
fix: align queue persistence channel type
Linuxuser67 Oct 25, 2026
07c9787
fix: use async queue serializer and test-only folder helper
Linuxuser67 Oct 25, 2026
ee057ff
test: wait for async video preparation
Linuxuser67 Oct 25, 2026
8ba9772
test: drain asynchronous destination preparation
Linuxuser67 Oct 25, 2026
9de5aa8
test: await async queue scheduling in lifecycle cases
Linuxuser67 Oct 25, 2026
46adb66
style: format asynchronous lifecycle tests
Linuxuser67 Oct 25, 2026
fee8128
test: isolate GLib contexts for async deletion tests
Linuxuser67 Oct 25, 2026
635a9d4
style: normalize test helper spacing
Linuxuser67 Oct 25, 2026
d11a47d
style: format async deletion assertions
Linuxuser67 Oct 25, 2026
cc845df
test: run async deletion on the shared GLib context
Linuxuser67 Oct 25, 2026
3775f94
test: fix formatting and remove unused context helper
Linuxuser67 Oct 25, 2026
ae81f5d
test: drain GLib deletion tasks before releasing context
Linuxuser67 Oct 25, 2026
d3e0a66
Drain cancellation cleanup in queue-order test
Linuxuser67 Oct 25, 2026
38ac4c4
Wait for cancellation cleanup workers in tests
Linuxuser67 Oct 25, 2026
56f8347
Count async preparation against download concurrency limit
Linuxuser67 Oct 25, 2026
9aa8026
Pass torrent selection snapshot into deferred cleanup
Linuxuser67 Oct 25, 2026
5a12eab
Snapshot torrent filter before deferred cleanup
Linuxuser67 Oct 25, 2026
a09a30c
Update torrent cleanup test for explicit selection snapshot
Linuxuser67 Oct 25, 2026
0ddca80
Preserve segmented resume and shutdown persistence ordering
Linuxuser67 Oct 25, 2026
1ac8eac
Avoid retrying stale finished-name claims
Linuxuser67 Oct 25, 2026
a645dbf
Prevent duplicate torrent enqueue submissions
Linuxuser67 Oct 25, 2026
b887f99
Own torrent submit button across async picker flow
Linuxuser67 Oct 25, 2026
8f3efea
Restore filesystem and intake invariant rationale
Linuxuser67 Oct 25, 2026
06f8db9
Revalidate finished-name generation after filesystem await
Linuxuser67 Oct 25, 2026
c7a9e79
Revalidate failed-version cleanup after filesystem await
Linuxuser67 Oct 25, 2026
aa701c6
Release failed-version reservation before stale exit
Linuxuser67 Oct 25, 2026
37668d5
Avoid retaining manager across truncation awaits
Linuxuser67 Oct 25, 2026
a6ece79
Separate async intake preparation from queue commit
Linuxuser67 Oct 25, 2026
913e99d
Keep async intake I/O outside queue batch guard
Linuxuser67 Oct 25, 2026
27459a1
Avoid holding queue batch across gallery filesystem preparation
Linuxuser67 Oct 25, 2026
292e411
Use batched intake for single-file torrent submit
Linuxuser67 Oct 25, 2026
200bbb9
Test async preparation respects concurrency cap
Linuxuser67 Oct 25, 2026
6a06c1f
Cover torrent cleanup after selection state is dropped
Linuxuser67 Oct 25, 2026
868ff47
Release manager before playlist directory preparation
Linuxuser67 Oct 25, 2026
a1e09d6
Fail explicitly when plain download preparation lacks a mode
Linuxuser67 Oct 25, 2026
29c52ff
Keep finished-name manager binding valid after await
Linuxuser67 Oct 25, 2026
1f3faaf
Extract atomic finished-name adoption with race-safe retries
Linuxuser67 Oct 25, 2026
ca0cfc8
Test finished-name adoption retries stale rename collisions
Linuxuser67 Oct 25, 2026
9e9e5f9
Restore collection expansion policy rationale
Linuxuser67 Oct 25, 2026
9cc7202
Represent prepared download modes with an explicit enum
Linuxuser67 Oct 25, 2026
d3269ac
Use explicit prepared-spawn variants through engine dispatch
Linuxuser67 Oct 25, 2026
fe70a50
Borrow prepared mode when checking segment cleanup
Linuxuser67 Oct 25, 2026
1cedf51
Restore progress from explicit resume preparation mode
Linuxuser67 Oct 25, 2026
da71cce
Resume scheduling after prepared-download validation failures
Linuxuser67 Oct 25, 2026
b7cf13a
Release manager before engine acknowledgement awaits
Linuxuser67 Oct 25, 2026
20ac32d
Reject stale playlist expansion after asynchronous preparation
Linuxuser67 Oct 25, 2026
b961912
Drop manager Rc across finished-name directory listing
Linuxuser67 Oct 25, 2026
31a02ee
Check both worker and truncation results explicitly
Linuxuser67 Oct 25, 2026
bc654bc
Reuse finished-name collision predicate across retries
Linuxuser67 Oct 25, 2026
dd6f787
Format prepared-spawn and shutdown changes
Linuxuser67 Oct 25, 2026
1c6c0a1
Format new concurrency and filename race tests
Linuxuser67 Oct 25, 2026
b0d5cdc
Format async enqueue helper bounds
Linuxuser67 Oct 25, 2026
db4603f
Format torrent cleanup signature
Linuxuser67 Oct 25, 2026
d2dfb0c
Keep restored progress visible when segmented resume starts
Linuxuser67 Oct 25, 2026
7ac62e4
Remove obsolete optional-mode fallback after enum conversion
Linuxuser67 Oct 25, 2026
7704c9e
Drop manager before fallback acknowledgement without using moved Rc
Linuxuser67 Oct 25, 2026
a5bde14
Fix clippy compile error in truncate worker handling
Linuxuser67 Oct 25, 2026
a82640d
Update playlist expansion test for weak manager API
Linuxuser67 Oct 25, 2026
a0fa9e8
Fix GTK signal connection borrow errors
Linuxuser67 Oct 25, 2026
d9b2ce6
Format playlist expansion test
Linuxuser67 Oct 25, 2026
09de520
Drop segment-state borrow before async worker
Linuxuser67 Oct 25, 2026
f9cbcb4
Fix playlist test module path
Linuxuser67 Oct 25, 2026
f653657
Fix add-button signal receiver ownership
Linuxuser67 Oct 25, 2026
838b352
Fix remaining Clippy warnings in download manager
Linuxuser67 Oct 25, 2026
78d56b5
Track and abort filesystem preparation tasks
Linuxuser67 Oct 25, 2026
2318089
Wait for filesystem preparation in download tests
Linuxuser67 Oct 25, 2026
652dd94
Format tracked preparation future
Linuxuser67 Oct 25, 2026
580c13d
Correct formatting of tracked preparation task
Linuxuser67 Oct 25, 2026
7c77dad
Fix formatting of tracked preparation task
Linuxuser67 Oct 25, 2026
385daea
Align async preparation await chains
Linuxuser67 Oct 25, 2026
1034caa
Fix rustfmt output for preparation task
Linuxuser67 Oct 25, 2026
42e5892
Wait for asynchronous download preparation in regression tests
Linuxuser67 Oct 26, 2026
d4895b3
Wait for async preparation in resume failure test
Linuxuser67 Oct 26, 2026
1cdf5c3
Format async preparation regression tests
Linuxuser67 Oct 26, 2026
b7c9eaf
Fix remaining rustfmt call formatting
Linuxuser67 Oct 26, 2026
82d8156
Wait for async preparation and replacement engine in tests
Linuxuser67 Oct 26, 2026
1208e8d
Fix rustfmt formatting in deferred pump test
Linuxuser67 Oct 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ async fn intake_remote_torrent(
Routed::OpenedCard
}
Ok(_) => {
if let Err(e) = manager.enqueue_torrent_file(bytes, &stem, None, None) {
if let Err(e) = manager
.enqueue_torrent_file_async(bytes, &stem, None, None)
.await
{
fail(e);
return Routed::Failed;
}
Expand Down Expand Up @@ -560,8 +563,9 @@ fn handle_open_files(s: Rc<State>, files: Vec<gio::File>) {
add_card.open_torrent_picker(file_name, bytes, entries);
}
Ok(_) => {
if let Err(e) =
manager.enqueue_torrent_file(bytes, &stem, None, None)
if let Err(e) = manager
.enqueue_torrent_file_async(bytes, &stem, None, None)
.await
{
toasts.add_toast(adw::Toast::new(&crate::ui_util::esc_markup(
&e,
Expand Down
1,106 changes: 796 additions & 310 deletions src/download.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/download_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub(crate) struct StoredItem {
pub(crate) gallery: Option<serde_json::Value>,
}

#[derive(Debug, serde::Serialize, serde::Deserialize)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub(crate) struct StoredQueue {
pub(crate) version: u32,
pub(crate) items: Vec<StoredItem>,
Expand Down
Loading
Loading