Commit Graph
761 Commits
Author SHA1 Message Date
sun 675028c64a fix(hls): isolate staging per task and finalize output atomically
- Give every task a random staging identity persisted in the saved
  state: two tasks downloading the same playlist into the same
  directory get separate segment folders and journals instead of
  deleting each other's progress
- Bind the journal to a fingerprint of the full download plan (media
  URL, ordered segments, ranges, keys); foreign or unreadable journals
  are discarded rather than applied to the wrong segments, and the
  ledger is rewritten through a temp file + rename
- Legacy states without a staging identity migrate to a fresh folder
  instead of reusing the shared URL-hash folder
- Merge into a unique temporary file next to the target, check write
  and close errors, then remove-then-rename over the final name: a
  failed merge preserves the staged segments for a retry and re-merging
  after a crash stays idempotent
- Drop the staging folder when a URL patch invalidates the plan
2026-09-15 11:27:26 +08:00
sun b6d18a267b fix(hls): rebuild request extras on restore and adopt merge semantics in Patch
- Parse the request extra in Setup so restored fetchers resend Referer,
  Cookie and other configured headers on resumed segment/key requests;
  the store/restore regression test round-trips the state and the task
  meta through JSON exactly like the engine storage does
- Rebuild the resolved plan on Start when the resource survived but the
  plan was lost to a crash between the task save and the first
  checkpoint, keeping the existing output name
- Patch now merges partial updates instead of replacing the request and
  options wholesale: URL-only patches keep the output path and renamed
  file, header-only patches keep the resolved plan and take effect on
  the next run, Labels merge per key, Proxy swaps rebuild the client,
  and nil arguments are no longer a panic. Editing a running task is
  rejected, consistent with the ed2k protocol
- Cover retry-after-failure counter resets, running-task patch
  rejection and the missing-state self-heal with regression tests
2026-09-15 11:18:40 +08:00
sun 40cfb167f6 fix(hls): isolate per-run lifecycle and use final-output byte accounting
- Give every Start its own run context, WaitGroup (including the queue
  producer), supervisor done channel and snapshots of the plan, request
  headers, HTTP client and merge target; Pause/Close wait for all run
  goroutines, including a merge in flight, before returning
- Build the HTTP client in Resolve/Start before workers launch instead of
  lazily inside do(), which raced between concurrent segment downloads
- Reject task edits while a run is active instead of mutating shared state
- Reset counters per run and seed them from the completed-segment journal;
  count only stored output bytes as progress, never discarded retry bytes
- Report Res.Size only when every segment is unencrypted with a known
  length; ciphertext sums overstate the final output, indeterminate plans
  rely on the engine's TotalDownloaded backfill at completion
2026-09-15 11:13:38 +08:00
sun ee9b16794e Merge branch 'GopeedLab:main' into main 2026-09-14 09:55:31 +08:00
sun 4f74101b3a feat(hls): add native HLS (m3u8) download protocol
New hls protocol in internal/protocol/hls (registered ahead of http):
- master playlist variant picking (highest bandwidth), RFC3986 segment
  URL resolution, fMP4 init segments, EXT-X-BYTERANGE, EXT-X-GAP skip
- AES-128 decryption with mid-playlist key rotation and sequence-derived
  IVs; explicit errors for live streams, SAMPLE-AES and multi-period fMP4
- concurrent segment downloads with retry, journal-based resume across
  pause/app restarts, automatic in-order merge into a single .ts/.mp4
- best-effort Content-Length probing for determinate progress
- anti-hotlink Referer/Cookie/UA via task extra headers (Go transport
  does not filter them)

Core: fix SchemeFilter extension match for URLs with query strings
(also benefits .torrent links); Flutter: Protocol.hls enum, hls protocol
config model (prevents config round-trip wipe) and HLS settings block
with localized labels in all 22 locales.

Tests: parser/crypto unit tests, httptest e2e (Referer-enforced CDN,
encrypted streams, byterange, pause/resume, store/restore) and an
opt-in live-site acceptance gate (HLS_LIVE_URL).
2026-09-14 09:55:31 +08:00
Levi cee5f3336e fix: extension install by deeplink (#1510) 2026-09-13 23:40:59 +08:00
Levi a760290213 fix(ui): enable task detail text selection and compact extension stats (#1511) 2026-09-13 23:30:45 +08:00
Levi a29f4bb42a fix(ui): use typed controls for extension settings (#1509) 2026-09-13 14:29:46 +08:00
Levi 62e8ab3cef fix(ui): show downloaded bytes for tasks with unknown size (#1508) 2026-09-13 11:57:26 +08:00
Levi 8fa9a1e902 fix(ui): preserve mobile home route and confirm Android exit (#1507) 2026-09-12 21:44:27 +08:00
Levi 46675f26af fix(ui): align history search placeholder and prevent clipping (#1506) 2026-09-12 20:04:28 +08:00
Levi 0d52b840a2 feat(ui): emphasize task creation and add empty-list actions (#1505) 2026-09-12 18:09:36 +08:00
Levi 091e7b8936 fix(ui): keep mobile create task actions in safe area (#1504) 2026-09-12 09:28:04 +08:00
Levi ff8f61423e fix(ui): refine app update dialog layout and scrolling (#1503) 2026-09-12 07:25:37 +08:00
Levi e5ac13cfdc docs: update beta download links v2.0.0-beta.2 2026-09-11 08:36:01 +08:00
Levi 073e1413ab release: 2.0.0-beta.2 2026-09-11 08:20:45 +08:00
Wu Shuwen 04b9aa18ec fix(http): infer extension for opaque URLs (#1495) 2026-09-11 08:01:32 +08:00
Levi 08fe4eef4e fix(ui): refine create task actions and relocate icon sources (#1500) 2026-09-11 08:00:03 +08:00
Levi 8f9bac9e6b fix(ui): reuse shared file path picker for script settings (#1496) 2026-09-10 23:51:16 +08:00
Levi bb17c7d48a fix(macos): request permission for download notifications (#1498) 2026-09-10 23:50:50 +08:00
Levi 75ffe70a4d fix(windows): use bundled PNG for notification header icon (#1499) 2026-09-10 23:50:09 +08:00
Levi 36f9f65384 fix(android): request notification permission on startup (#1497) 2026-09-10 23:05:15 +08:00
Levi 5f89ae3516 fix: unify platform window titles as Gopeed (#1494) 2026-09-10 23:03:43 +08:00
Levi 0cc2b690f8 fix: create task panel mobile UI (#1488) 2026-09-10 23:02:53 +08:00
Levi b991482617 fix(macos): prevent closed task windows from reopening (#1492) 2026-09-10 00:19:49 +08:00
Levi 1f8906f952 fix(android): via browser takeover handling (#1489) 2026-09-09 23:28:41 +08:00
Levi 0efc85d3c0 feat: unify native API invocation with async callbacks (#1476) 2026-09-08 23:47:38 +08:00
Levi 481675107f fix(android): refresh download URL when create page is already open (#1493) 2026-09-08 22:53:31 +08:00
Jamal Ali 6568498850 feat(i18n): add Azerbaijani (az) locale (#1490) 2026-09-07 17:56:30 +08:00
Levi 67814348dc fix: upgrade to race-safe dart_ipc (#1479) 2026-09-07 09:23:26 +08:00
Levi 53d13dfe28 fix(ui): preserve desktop platform listeners (#1483) 2026-09-06 20:36:48 +08:00
Levi d511e66d56 fix(ui): improve cross-platform text input behavior (#1477) 2026-09-06 17:18:57 +08:00
Levi 16f2d30476 fix(flutter): keep create task advanced options collapsed (#1481) 2026-09-06 16:43:14 +08:00
Levi aafd039205 fix(flutter): create log directory recursively (#1478) 2026-09-06 13:00:06 +08:00
Levi 647e161431 docs: optimize README screenshots 2026-09-05 22:55:33 +08:00
Levi 8f3cf35162 fix(windows): prevent crash when notification service is unavailable (#1472) v2.0.0-beta.1 2026-09-05 20:51:07 +08:00
Levi f2145de571 feat: add MCP support (#1471) 2026-09-05 20:21:39 +08:00
Levi 39cd9034cd feat: move native communication to FFI (#1457) 2026-09-05 20:18:42 +08:00
Levi 177c225f16 feat: new ui (#1455) 2026-09-05 19:53:41 +08:00
Levi 3be8db664c fix(http): resume ranged downloads with unknown size (#1467) 2026-09-03 23:16:38 +08:00
Levi 9b704f6f14 fix(http): keep Resolve response until Range takeover succeeds (#1465) 2026-09-02 23:49:37 +08:00
ggg f49e2510f5 fix(http): re-probe range support after sequential retry (#1464) 2026-09-02 14:29:48 +08:00
Levi c5c8bb2bf5 fix(http): reset discarded prefetch progress on resume (#1462) 2026-08-31 23:05:01 +08:00
ggg 962ff4dc98 fix(http): fall back when servers ignore range requests (#1459) 2026-08-31 22:32:14 +08:00
Levi 59f3aa7028 test: enforce async extension API contract (#1452) 2026-08-27 12:51:37 +08:00
Levi cfdf87c3b8 feat: HTTP add TLS fingerprint fallback (#1444) 2026-08-20 20:21:02 +08:00
Afterain 99924296ef feat: Background download on iOS (#1442) 2026-08-18 18:08:53 +08:00
Afterain 9d3221ebbb feat: open data directory on iOS (#1440) 2026-08-17 09:33:36 +08:00
Chen, Ting-An 7b7327ffb3 fix(i18n): complete Traditional Chinese locale (#1431) 2026-08-13 19:38:30 +08:00
Levi fdfc6902a7 feat: enhance extension API (#1413) 2026-07-14 20:52:21 +08:00