Skip to content

feat: Add to Debrid first, then download (Real-Debrid & TorBox)#2036

Open
smartcoder0777 wants to merge 7 commits intohydralauncher:mainfrom
smartcoder0777:feature/add-to-debrid-then-download
Open

feat: Add to Debrid first, then download (Real-Debrid & TorBox)#2036
smartcoder0777 wants to merge 7 commits intohydralauncher:mainfrom
smartcoder0777:feature/add-to-debrid-then-download

Conversation

@smartcoder0777
Copy link

@smartcoder0777 smartcoder0777 commented Feb 24, 2026

When submitting this pull request, I confirm the following (please check the boxes):

  • I have read the Hydra documentation.
  • I have checked that there are no duplicate pull requests related to this request.
  • I have considered, and confirm that this submission is valuable to others.
  • I accept that this submission may not be used and the pull request may be closed at the discretion of the maintainers.

Fixes: #2016

Summary
Adds an “Add to Debrid first, then download” option for Real-Debrid and TorBox. When enabled, the app adds the magnet to the debrid service and waits until the torrent is ready before starting the download, instead of downloading the torrent directly.
Changes

  • Download flow: New checkbox in the Download settings modal: “Add to Debrid first, then download”. When checked with Real-Debrid or TorBox, the client adds the magnet to the service, polls until the torrent is ready (or timeout), then downloads from the debrid URL.
  • Real-Debrid: waitForTorrentReady() with configurable poll interval and timeout; supports progress callback.
  • TorBox: Same wait-for-ready behavior with polling until state is cached/completed (or timeout).
  • Types & UI: addToDebridThenDownload added to download payload and Download type; modal and download flow updated to pass and use it.
  • Lint: Replaced while (true) polling loops with a non-constant condition and added post-loop throws for TypeScript.
    Testing
    Verified with TorBox: chose a repack with magnet links, enabled “Add to Debrid first, then download”, started download; TorBox was used and download completed from TorBox.
image Screenshot_3 Screenshot_1

Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=191128130

@smartcoder0777
Copy link
Author

Hi maintainers, can anybody review and merge my PR? Thanks.

@smartcoder0777
Copy link
Author

Hi @thegrannychaseroperation can you review and merge my PR?

@Moyasee
Copy link
Contributor

Moyasee commented Mar 1, 2026

Hi @smartcoder0777 ! We are reviewing all PRs before making an a update for Hydra, yours will be reviewed as well once we would be ready to make an a update

@smartcoder0777
Copy link
Author

@Moyasee I got it. Thanks for your response. I will look forward to your review.

@AndyClausen
Copy link

Tried it out, and there's a minor issue: if the torrent has no seeders, you will be unable to download anything else unless you restart the client. I think you'd have to either make it part of the download process (rather than a step before), or make it completely separate, so you just add a button to download to debrid and not locally.

@smartcoder0777
Copy link
Author

@AndyClausen Thanks for your review. Let me fix it now.

@smartcoder0777
Copy link
Author

Tried it out, and there's a minor issue: if the torrent has no seeders, you will be unable to download anything else unless you restart the client. I think you'd have to either make it part of the download process (rather than a step before), or make it completely separate, so you just add a button to download to debrid and not locally.

@AndyClausen Make it completely separate or make it part of the download process - which one will be better?
Please let me know what you think. I will implement it.

@sonarqubecloud
Copy link

@AndyClausen
Copy link

I'm not familiar with the codebase, but from a UX perspective I'd say part of the download process. But I would also guess that this would be the most difficult one to do.

@smartcoder0777
Copy link
Author

I'm not familiar with the codebase, but from a UX perspective I'd say part of the download process. But I would also guess that this would be the most difficult one to do.

I pushed updates. It's already done!

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.

Feature Request: 'Add to Debrid, then Download' option

4 participants