Add HIGHWAY support - #1039
Open
Yaknar wants to merge 2 commits into
Open
Add HIGHWAY support#1039Yaknar wants to merge 2 commits into
Yaknar wants to merge 2 commits into
Conversation
Add high-way.me as a debrid provider (Provider.HIGHWAY), modeled on TorBoxDebridClient since it's the only existing client that already handles both torrents and NZBs against a polled, non-instant backend. Server integration (HighwayDebridClient, transfers.php): - add/list/status/delete via bearer token (API key setting) - 32-hex spool-reference -> numeric transfer id promotion once HIGHWAY starts a queued transfer, mirrored in Torrents' reconcile loop - state mapping (queued/downloading/completed/error -> TorrentStatus) - account info via ?stats=1 (username, premium, plan expiry) - pre-add cache check via ?check= for GetAvailableFiles() Two download modes: - Symlink: resolves files straight from an rclone WebDAV mount (content_path + files[].path), no HTTP transfer - Internal/Aria2c: downloads each file via its own signed files[].download_url (respects include/exclude/min-size filters, no unzip step); falls back to the whole-transfer ZIP only when per-file signed URLs aren't available server-side Fixes found while testing against the live server: - DownloadClient: fall back to the provider's reported size when a download's Content-Length is unknown (HIGHWAY's on-the-fly ZIP streams without one, so progress got stuck at 0%) - DebridClientUser/Profile: add a Premium flag so accounts with an unlimited/no-expiry plan don't show "Not premium" in the navbar - torrent.component.html: fix the status label switch, which used stale numeric literals from before TorrentStatus.Queued=0 was added and was off by one for every provider, not just HIGHWAY UI: HIGHWAY option + help text in the setup wizard and navbar provider link; the Settings page picks up the new provider and its API-key field automatically via the existing enum/reflection UI. Docs: README HIGHWAY section incl. rclone.conf snippet. HIGHWAY_PROVIDER_SPEC.md documents the transfers.php API this is built against. Tests: new HighwayDebridClientTest (add/list/status/delete, state mapping, symlink path resolution, per-file vs ZIP fallback, error handling); existing Torrents(...) call sites updated for the new ctor parameter.
Remove outdated info
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds HIGHWAY (
high-way.me) a Multi One Click Hoster that also downloads torrents and usenetserver-side, as a new debrid provider, alongside Real-Debrid,
AllDebrid, Premiumize, TorBox and DebridLink.
What's new
HighwayDebridClient: talks to HIGHWAY'stransfers.phpRESTAPI (bearer token auth) for adding, listing, polling status and
deleting torrent/usenet transfers. Modeled on
TorBoxDebridClient,the only existing client that already handles both torrents and
NZBs against a polled (non-instant) backend.
files are resolved straight from the mount, nothing is downloaded twice.
Each file is fetched via its own signed
download_url(realContent-Length, respects the usual filefilters), falling back to a whole-transfer ZIP only if HIGHWAY
hasn't signed per-file URLs for that transfer.
HIGHWAY's
?stats=1, shown in the navbar like other providers.Fixes along the way
A few things surfaced while testing against a live HIGHWAY account
that affect every provider, not just this one:
Real-Debrid Status) mappedthe wrong text to each
TorrentStatusvalue, stale sinceQueued=0was added to the enum.unlimited/no-expiry plan (only dated expirations counted as
"premium" before).
Content-Length(streamed,chunked) got stuck showing 0% progress forever, even while actively
downloading at full speed. Fallback to total Size of the Download.
Testing
dotnet test server/RdtClient.sln, all green, incl. a newHighwayDebridClientTestcovering add/list/status/delete, HIGHWAY'sstate machine, symlink path resolution, and the per-file/ZIP
fallback logic.
cloud.high-way.meAPI and a real HIGHWAY account: adding a magnet and an NZB, polling
to completion, per-file downloads with real
Content-Length, andthe rclone-mount symlink path.
Docs
README.mdgets a HIGHWAY section (settings, the two downloadmodes, an
rclone.confsnippet).