Commit graph

28 commits

Author SHA1 Message Date
kingbri
4fda0d63db Ferrite: Add sources guide
May become a wiki in the future.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-31 00:41:38 -04:00
kingbri
940f8337a5 Ferrite: Overhaul sources
Sources are now completely changed to use a more flexible API. This
uses a fully native source system, so there will be 0 overhead on
resource usage and performance.

JSON objects specify what is fetched and displayed by Ferrite when
searching torrents.

Sources now include sizes, seeders, and leechers for any site that
specifies them.

The versioning and repo naming framework has been added, but will be
displayed in another update.

API support will be included in another update.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-31 00:41:38 -04:00
kingbri
64798a172a Scraping: Remove workaround for last-child
Last-child is not supported on SwiftSoup, but nth-last-child is.
Therefore, sources must use nth-child or nth-last-child instead of
the first-child and last-child aliases.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-31 00:41:38 -04:00
kingbri
d1b34fe964 Settings: Add AboutView and style buttons
Add a ListRowButtonView which runs a function and include a label.
Use this to style magnet choice buttons.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-31 00:41:35 -04:00
kingbri
05d61e440a Ferrite: Remove commented code
Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
467eb1eb09 MagnetChoice: Add open in webtor button
WebTor is a website to view magnet links on the web for free. It
has an API to include magnets, so why not?

Suggested by BlackSwordsman in Discord.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
b88a6cf96f Search: Fix sheet and results bug for iOS 15
In iOS 15, a searchbar will become inherited if a sheet call is
within the searchable view and its children.

Migrate the sheet call outside the search results view.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
74a610c2c0 Ferrite: Bump version
Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
88162814d5 Sources: Migrate source list addition to ViewModel
I was accidentally calling dismiss on failure which dismisses the
alert and breaks how presentation is handled on sheets.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
9d5a0d0120 Ferrite: Format
Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
119a3a18b1 SearchResults: Add source filtering
Presenting all source results can be annoying to a user. Add filtering
to filter by a specific source.

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
ac42936afb BatchChoiceView: Fix app crash on dismiss
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
45526057ac Ferrite: Bump version
Not ready for 0.1, but 0.0.2 sounds good.

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
1ddf50cd15 ScrapingModel: Add errors to scraping
Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
2df0ce7604 Ferrite: Fix toast UI
Refactor the GroupBox style and make error fonts smaller to not
impede the user's experience.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
e0daa453c3 SearchResults: Add more information to results
Reformat how RealDebrid availability is shown and add a size value
to the search result card.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
Brian Dashore
02b22c7c88 Add CircleCI configuration
Temporarily used instead of Github actions since actions
has no Xcode 14 access.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
ffa5e0d4d9 Add Github actions
Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
6cfd32ce5a Ferrite: Change version settings
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
c2f267dbc3 Ferrite: Add README and group classes
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
kingbri
0ce54327fb Initial Commit 2022-07-01 12:45:04 -04:00