Skip to content

feat: add download management actions#71

Merged
roziscoding merged 4 commits into
mainfrom
feat/download-management-actions
Jul 26, 2026
Merged

feat: add download management actions#71
roziscoding merged 4 commits into
mainfrom
feat/download-management-actions

Conversation

@roziscoding

@roziscoding roziscoding commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • add Management API endpoints to cancel, retry, and delete downloads by numeric record ID
  • persist the last failed operation so transfer retries resume .part files and import retries skip re-downloading
  • coordinate transfer/import/delete operations to prevent same-infohash sibling and filesystem races
  • add responsive UI actions with confirmations, pending state, notifications, and refresh
  • avoid Sonarr manual-import discovery failures when a new series folder does not exist yet

API

  • POST /downloads/:id/cancel
  • POST /downloads/:id/retry
  • DELETE /downloads/:id

Verification

  • bun test apps packages — 447 passed
  • focused concurrency re-review — 104 passed
  • mise run lint
  • mise run typecheck
  • git diff --check

Notes

The retry endpoint dispatches from persisted operation state rather than display status. Failed manual imports are retried directly through Radarr/Sonarr without downloading the file again.

Greptile Summary

Adds download-management operations across the backend and management UI.

  • Adds cancel, retry, and delete endpoints keyed by numeric download ID.
  • Persists failed-operation state to distinguish transfer retries from import retries.
  • Coordinates transfer, import, deletion, and artifact-path ownership.
  • Adds responsive UI actions, confirmations, notifications, and pending states.
  • Adjusts Sonarr manual-import discovery for missing series folders.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the shared deletion-path reservation prevents a retry from starting once deletion begins, while JavaScript run-to-completion ensures deletion synchronously obtains and aborts an already-started transfer before awaiting its completion.

Reviews (5): Last reviewed commit: "fix(sonarr): avoid missing series folder..." | Re-trigger Greptile

Comment thread apps/backend/src/modules/downloads/downloads.service.ts
@roziscoding
roziscoding force-pushed the feat/download-management-actions branch from 435a445 to 4633565 Compare July 26, 2026 18:03
Comment thread apps/backend/src/modules/downloads/downloads.service.ts
@roziscoding
roziscoding merged commit 6291e6c into main Jul 26, 2026
10 checks passed
@roziscoding
roziscoding deleted the feat/download-management-actions branch July 26, 2026 20:40
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