For URL encoded bodies, always send the percent encoded query since
invalid parameter errors will result.
Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
Since protocols can't be observed in SwiftUI, use a roundabout way
to check if a user is logged in. Maybe this should be changed in the future,
but it works for now.
Signed-off-by: kingbri <bdashore3@proton.me>
The new AllDebrid IA method follows the same behavior as RealDebrid.
Only add user magnets into the IA if they're actually cached and
not caching into the service.
Signed-off-by: kingbri <bdashore3@proton.me>
To avoid inflating the IA value cache, restore the TTL logic and only
append IAs that are part of the sent magnets.
In addition, if an IA result isn't found for a model download, re-fetch
the IA cache.
Signed-off-by: kingbri <bdashore3@proton.me>
This is a manual button so users can download an item to their preferred
debrid service. If the item is cached in the debrid, it will download instantly
and display the result to the user. Otherwise, the caching alert is shown.
Signed-off-by: kingbri <bdashore3@proton.me>
The instantAvailability endpoint is now removed, so make IA return
a user's magnets instead with reliance on manual download as the
second solution.
Signed-off-by: kingbri <bdashore3@proton.me>
Cloud magnets are now under a rate limit and links are no longer
present per entry. Remove rich display for that section only and
present a batch sheet on click.
Also add more spots for cleaning up variables.
Signed-off-by: kingbri <bdashore3@proton.me>
Different services can send different statuses for if a file is
cached or not. Therefore, make this scoped to the debrid service
rather than expecting everything to state "downloaded".
Also it feels pretty blank if the disclosure groups are gone when
a cloud array is empty, so remove those checks.
Signed-off-by: kingbri <bdashore3@proton.me>
Populate cloud lists when the app is launched to begin maintainence
of a synced list. In addition, fix the errors when OffCloud tried
fetching links for a single file. The explore endpoint only works
when the file is a batch which is unknown until it's actually called.
Signed-off-by: kingbri <bdashore3@proton.me>
If a debrid is authorized, a Published variable needs to be notified
since SwiftUI can't read computed properties on the fly (they are
getters). Therefore, it's better to maintain a single source of truth
of which services are logged in.
Signed-off-by: kingbri <bdashore3@proton.me>
TorBox can now show if there's a batch before loading a file.
Cloud downloads should check the server in case there's a different
method to fetch a download link.
Signed-off-by: kingbri <bdashore3@proton.me>
- AllDebrid: Don't throw an empty error if cloud downloads/torrents
is empty
- Fix history not saving with the proper URLs
- Fix the HTMLParser looking at the incorrect term for seedLeech
Signed-off-by: kingbri <bdashore3@proton.me>
OffCloud is a debrid provider that allows for caching and playing
media. Does not have rich debrid support.
Also add a handler if functionality isn't implemented in the service.
Signed-off-by: kingbri <bdashore3@proton.me>
The task can be set to nil after completion, and the unrestrict
flag should also be set to nil when the batch sheet is dismissed.
Signed-off-by: kingbri <bdashore3@proton.me>
TorBox is a service that handles magnet links under both a free
and paid plan. Integrate support into Ferrite. Will add rich services
once the instantAvailability endpoint returns a file list.
Signed-off-by: kingbri <bdashore3@proton.me>
Some debrid services aren't "rich", which means that they don't
broadcast whether an instantly available torrent is a batch or a
single file. This results in all torrents either having the green
badge or red badge based on what hash is given.
However, batches need to intercept the download itself which requires
the download function to be split into download and unrestrict. In
between, there's room for the batch sheet to act.
Signed-off-by: kingbri <bdashore3@proton.me>