Commit graph

201 commits

Author SHA1 Message Date
kingbri
273403b711 Debrid: Remove per-API IA structures
These aren't required since IA is a unified type. Only keep batch
IA for RealDebrid since it helps clear up confusion when gathering
InstantAvailability results.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-06-03 16:27:47 -04:00
kingbri
f9ecc746a1 Tree: Format
Signed-off-by: kingbri <bdashore3@proton.me>
2024-06-03 16:25:32 -04:00
kingbri
c641fdf300 Debrid: Add source to all models
Gives an ID of where the struct came from.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-06-03 16:24:07 -04:00
kingbri
f902142fee Debrid: Add Premiumize to InstantAvailability
Also add the requirement to the protocol.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-06-03 16:15:17 -04:00
kingbri
37ef64224e Debrid: Order API implementations
Reorder everything and mark off where different functions are located.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-06-03 16:00:40 -04:00
kingbri
9e306eff1e Debrid: Add protocol for cloud handling
Cloud downloads and torrents are now unified under their own
protocol and models. Downloads and torrents are separated.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-06-03 15:46:18 -04:00
kingbri
37450ef979 Debrid: Add InstantAvailability and download to protocol
Unify IA into a passable client side structure and add a common
download method to the DebridSource protocol.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-06-02 23:08:05 -04:00
kingbri
0fe1cbc888 Debrid: Begin using common protocols
Unifying the debrid services under a protocol will help slim down
on excess redundant code and allow for easy addition of new services
in the future.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-06-02 12:31:19 -04:00
kingbri
2e746320cf NavView: Switch to NavigationStack for iOS 17 and up
iOS 17 fixes the issues that NavigationStack had with iOS 16. This
means that futureproofing is fixed.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-08-27 01:14:26 -04:00
kingbri
13a40a237a Premiumize: Fix DDL fetching and debrid IA handling
Signed-off-by: kingbri <bdashore3@proton.me>
2023-08-26 11:29:19 -04:00
kingbri
46e0687bd7 Scraping: Add new source methods
Some sources can be unique and require some extra parsing. Add the
ability to extract a magnet link instead of assuming that every
source provides a properly formatted one.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-06-06 20:09:43 -04:00
kingbri
b8978fd29c Premiumize: Fix API key usage
PM has a different method to handle API keys compared to other services
which takes the value as an authorization header.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-05-02 14:44:03 -04:00
kingbri
cc550dd208 Debrid: Various updates to API and settings
Debrid services can change their APIs at any time which negatively
impacts user experiences on Ferrite.

Add the following:
- Ability for a user to add a manually generated API key only showing the
last 4 characters for security purposes.
- Make ephemeral auth sessions toggle-able. ASWebAuthenticationView does
not automatically clear on toggle change.
- Add the savedLinks endpoint for AllDebrid so users can access their
downloads and magnets.
- Add a links section to AD's cloud view.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-05-01 18:07:15 -04:00
kingbri
d8db3e0cc8 Ferrite: Bump version
Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-23 15:57:32 -04:00
kingbri
3606dbb6ff Settings: Fix focus for fields
Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-23 15:57:18 -04:00
kingbri
9e362c14b7 Ferrite: Format
Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-23 15:43:45 -04:00
kingbri
76a0262a14 Filters: Fix label with single value pickers
Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-23 15:43:45 -04:00
kingbri
468d89b983 Scraping: Add configurable URLRequest timeout
Some websites and networks may be slow. Add the option to override
the request timeout of 15 seconds for search requests.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-23 15:43:42 -04:00
kingbri
45900d6456 SecureField: Fix keyboard focus when showing password
Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-23 15:14:12 -04:00
kingbri
5232ddfc97 Filter: Add multi-select picker and change picker style
The default SwiftUI picker is too limited for Ferrite's purposes.
Switch to a custom implementation for UI consistency.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-23 15:14:12 -04:00
kingbri
f7d2f1ce60 Filters: Add result sorting
Sort by seeders, leechers, and size. Also supports ascending and
descending options.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-23 15:14:12 -04:00
kingbri
dc3014095c Search/Lists: Fix UI issues and appearance
The search bar sometimes had the scope bar added twice if a toolbar
was present (probably caused a refresh of the navigationTitle).

Rather than figuring out a hacky swiftUI solution to solve this,
add a check to enforce only one HostingViewController in the
scope bar.

Also migrate the inlinedList modifier to use safeAreaInsets from
native SwiftUI. Keep the introspected modifier for negative values.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-23 15:14:09 -04:00
kingbri
df534327e5 Scraping: Fix JSON scraping with subResults
SubResults were nullified by new title and magnet checks since they
were removed on the first pass.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-12 18:13:09 -04:00
kingbri
1d89b9519d Filters: Fix animations and add clear all button
Filters are more comprehensive and responsive to how many filters
are stored and if a user should clear all of them or not.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-12 18:13:09 -04:00
kingbri
8123fd8d0c Filters: Add debrid cache status option
Items can now be filtered based if they're present in the debrid cache,
are a batch file, or not present at all.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-12 18:13:09 -04:00
kingbri
75be076e0b Search: Fix keyboard lag with searchText
Make searchText a local variable passed to ScrapingModel to prevent
extreme keyboard lag and CPU usage when tracking this EnvironmentObject.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-09 21:37:14 -04:00
kingbri
4f303e1c1e Filters: Fix source filtering
Make it so that when a user chooses a source to filter, only filter
that specific source when a search occurs.

Also fix the "no results found" overlay text by checking if the
search bar textfield is being edited or not by modifiying ESSearchable.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-09 21:37:07 -04:00
kingbri
9427ca271b Ferrite: Format
Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-09 00:12:43 -04:00
kingbri
eacccf36ff Search: Add ExpandedSearchable replacement
ExpandedSearchable opens up the capabilities of the SwiftUI searchable
modifier and allows for additions of more properties such as custom
scope bars.

Since this is a reimplementation of UISearchController, changes
to SwiftUI should not affect search bars that rely on the scope bar
to always be present.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-09 00:12:40 -04:00
kingbri
fbd99752e4 Ferrite: Update to support iOS 16.4 and Swift 5.8
Xcode 14.3 changed many parts about swift which caused Ferrite to
not compile.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-08 18:17:50 -04:00
kingbri
d5ba67503b Plugins: Fix refreshable
Place refreshable in the individual lists instead of in the parent
ZStack as that applies to sheets as well.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-04 15:07:08 -04:00
kingbri
29614bc0f8 GitHub: Change repository URL
Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-02 15:32:01 -04:00
kingbri
b2616bdeb7 Plugins/Library: Add refreshable
Allow using pull to refresh for fetching plugins and information from
debrid cloud.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-02 15:14:42 -04:00
kingbri
d918039810 Plugins: Add website and about properties
These will serve as descriptions for a plugin which will be displayed
in the Plugin Info screen.

website has also replaced baseUrl and dynamicWebsite has replaced
dynamicBaseUrl

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-02 14:53:22 -04:00
kingbri
51366f3215 Sources: Don't require searchUrl in HTML parser
searchURL used to be a required variable in HTML parsers, but some
HTML sources can be single page which means that a search URL isn't
required.

Also make regex matching case insensitive along with adding anchors
to match newlines.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-01 23:19:15 -04:00
kingbri
22bec5da52 Plugins: Add option to use YAML for lists
YAML is a modern configuration format which is human readable
and supports more conventions than JSON.

However, some people may still prefer to write in JSON, so add the
option for users to write legacy JSON if they want to and to provide
backwards compatability with older plugins.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-01 23:11:30 -04:00
kingbri
c8c7732575 Search: Fix searchbar and prompts
Make searchbars adhere to autocorrect and fix the random search prompts
not applying by moving functionality to a ViewModel.

Also add a searchbar in the batch choice sheet.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-01 14:56:43 -04:00
kingbri
2cf6e46422 Sources: Improve regex and require title
Titles are now required as an entry without a title shouldn't be
featured. Support via regex is now added for matching along with
splicing strings via capture groups.

If a capture group isn't present, assume that a contains check
is occurring.

Also migrate back to searchText being located in scrapingModel.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-04-01 14:12:43 -04:00
kingbri
2982c971a8 Pickers: Change to the Picker structure
Pickers used to use a List workaround, change this to use actual
SwiftUI pickers.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-30 12:12:14 -04:00
kingbri
e650bbd2bb Settings: Switch NavigationLink initializers
Update to modern initializers instead of using deprecated ones.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-29 17:28:33 -04:00
kingbri
4ba58dc67f Ferrite: Use legacy NavigationView
NavigationStack has some glaring UI bugs, so switch back to
NavigationView for now since none of the new benefits from NavigationStack
are actually being used.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-29 15:26:00 -04:00
kingbri
3828ffa539 Ferrite: Forward port UI
Remove all iOS 14 specific components and workarounds and comply
with SwiftUI 3.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-29 14:43:49 -04:00
kingbri
8f9f522846 Bump minVersion to iOS 15
v0.7 and up drops iOS 14 support.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-28 12:22:46 -04:00
kingbri
2435952a86 Update README
Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-28 12:05:05 -04:00
kingbri
1ed0710446 Ferrite: Bump version
Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-28 11:59:41 -04:00
kingbri
5a73efa9dc Plugins: Fix crash on iOS 14
When installing an action and going back and forth to a different tab,
the app crashes on iOS 14.

Fix this by refreshing the list without worrying about previous
state. This makes Ferrite more efficient in terms of plugin fetching.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-28 11:53:49 -04:00
kingbri
371281118f Ferrite: Bump version
Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-24 17:20:43 -04:00
kingbri
39a705717e Plugins: Unify settings
Plugin settings used to only be available for installed sources.
Change this to display info about an installed plugin and add settings
depending on the plugin type.

For example, a source will have additional settings specified by its
own views.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-24 17:20:40 -04:00
kingbri
9f83ebfce0 Ferrite: Format
Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-24 14:39:11 -04:00
kingbri
87d94e4c35 Plugins: Fix animation and appearance
Switching to a list that changes state on updates caused sheets
to break when animating. Place the list in a container ZStack
that doesn't break sheet presentation.

Also modernize the plugin installation buttons and make the catalog
buttons include the plugin list name which should help prevent
duplication.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-24 14:37:52 -04:00