Commit graph

8 commits

Author SHA1 Message Date
kingbri
9d5a0d0120 Ferrite: Format
Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
1eef8202ca Ferrite: Decouple torrent sources
These sources will be converted to be more flexible with JavaScript
in the future.

The source catalog is populated by adding a source list in settings
then installing a source from the catalog.

Sources can be enabled or disabled when using Ferrite.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
4e169b47b3 Ferrite: Remove keychain shared class
Re-enable this when it's actually needed.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
e634906ab4 Ferrite: Add SwiftFormat
Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
e9670ea118 RealDebrid: Add batch torrent support
Batch torrents are torrents that have multiple files bundled within
one torrent file.

RealDebrid does support these, but it is difficult to get them to work.

The main flow requires setting a specific combination in RealDebrid
to allow for link generation. However, this is not intuitive to users
and is bad API design on RealDebrid's part.

Ferrite's implementation presents users with all the possible files
from batches (duplicates deleted) and selects the user-chosen file
to download. That way, only the user chosen file is presented to
play on an external video player.

This still needs work for optimization purposes, but this commit
does produce a working build.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
47f713744b RealDebrid: Demystify instantAvailability endpoint
The instantAvailability endpoint is now decoded using Codable
and does not have any ambiguity.

Batches are now checked, but still not accounted for due to how
RD handles batches from this endpoint. All batch links are not
supported for instant streaming from Ferrite until support is added.

Thanks to Skitty for helping out with decoding the endpoint.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
4a53eb052c RealDebrid: Add universal request wrapper
Every request has to add an authentication header. If the response
is 401 (Unauthorized), log the user out of RealDebrid.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
e2792a0f00 Ferrite: Add code up to alpha 1
Working alpha version of Ferrite

Signed-off-by: kingbri <bdashore3@gmail.com>

part2
2022-07-21 00:01:41 -04:00