Commit graph

178 commits

Author SHA1 Message Date
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
kingbri
ff13884b2b Application: Use the plist minVersion to restrict updates
It's more reliable to use the plist which contains the min version
to determine if an update notification should be shown.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-23 11:52:52 -04:00
kingbri
c719d2cd87 Ferrite: Bump version
Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-23 11:06:40 -04:00
kingbri
254058928f Library: Fix debrid cloud fetch in iOS 14
onAppear wasn't being called with the current implementation of the
cloud tab in library. Fix this to listen to the selectedDebridType
variable instead of relying on the onAppear call of a view.y

Also do some further project cleanup and LOC removal

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-23 11:04:30 -04:00
kingbri
e0784b3cec Ferrite: Format
Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-21 13:56:50 -04:00
kingbri
6e95c6072c Settings: Fix Default actions and Kodi
Fix how default actions are picked and add in default app actions
as options for both debrid and magnet defaults. Kodi shows the
action choice sheet with the DisclosureGroup dropped down.

The new Kodi server framework also wasn't implemented in the Kodi
wrapper. Fix that.

Finally, add some iOS 14 fixes and repair the autocorrect search
setting to actually work.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-21 13:56:09 -04:00
kingbri
edfba1c62e Ferrite: Format
Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-19 21:26:42 -04:00
kingbri
69d2f6babe Actions: Add OS-specific checks
Plugin lists are universal across clients and OS-specific cases
should be appropriately handled.

OSes can now be added to the deeplink action case and Ferrite scans
for either iOS-specific or fallthrough actions.

There must be 1 action that corresponds to an OS and/or 1 fallback
case, otherwise the action will not show in the plugins list.

Also remove some extraneous files.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-19 21:24:24 -04:00
kingbri
20c55316b0 Kodi: Add multi-server support
Multiple servers can be added to Ferrite to playback from any Kodi
server that the user wants. This also adds the ability to have
friendly names which makes it easier to select what server to play on.

Each server shows the user whether it's online or not through Kodi's
JSONRPC ping method.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-18 16:30:27 -04:00
kingbri
d2d7d7364f Logging: Add exportability to logs
Logs can be exported into their own files. I'm still debating on
writing a continuous stream to a logfile that persists on app
crashes.

Also make the show error toasts toggle only apply to generic errors
and not customized error toasts.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-10 15:01:00 -05:00
kingbri
7202a95bb2 Ferrite: Parallel tasks and logging
Make all tasks run in parallel to increase responsiveness and efficiency
when fetching new data.

However, parallel tasks means that toast errors are no longer feasible.
Instead, add a logging system which has a more detailed view of
app messages and direct the user there if there is an error.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-09 18:48:28 -05:00
kingbri
a0632b0c16 Updates: Make updater restricted to minVersion
For versions that require iOS 15 and up, don't notify previous iOS 14
users about a new update. This requires a minVersion attribute in
the shared Application class.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-06 00:07:13 -05:00
kingbri
618041714d CustomScopeBar: Fix search bar placement
iOS 16 has a new search bar placement value which applies the searchbar
in the top-right corner with iPads. Searchable does this automatically,
but SwiftUIx's modifier needs this fix.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-05 23:51:21 -05:00
kingbri
d504369e98 Settings: Add debrid info views
Add some extra info for debrid services so they look similar to the
Kodi view.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-05 15:21:58 -05:00
kingbri
b8799be896 Ferrite: Add Kodi support
Adds support for playing links on a preset Kodi server. This is
less featured than the Ferrite companion, but should still work
without a problem.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-05 14:11:52 -05:00
kingbri
438e48be66 Ferrite: Format
Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-03 15:09:34 -05:00
kingbri
8c8e9d0215 Ferrite: Bump version
Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-02 11:23:14 -05:00
kingbri
282783c460 Plugins: Fix list sync in view
Plugin entries were not syncing properly inside the plugins view.
Instead of adding events to update filtered lists, make it so that
these filtered lists are updated on state changes.

This is the intended method of reactive programming and removes
complexity from filtering logic.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-02 11:06:57 -05:00
kingbri
f622b7af05 Actions: Fix default action settings
Since actions use a new API, update default actions to use the
same API rather than the legacy models. If an action is removed,
a prompt will tell the user to change their default debrid/magnet
action and default to the choice sheet.

Also add extra UI fixes and cleanup.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-03-01 18:31:29 -05:00
kingbri
0661ed66f3 Search: Fix picker overlay and position
iOS 14 requires the scope bar modifier to be on the first subview of
the NavView. This is because a VStack wraps the content.

A bug was that the segmented picker was being overlaid due to the
scope bar modifier having an AppStorage call. The AppStorage call
updated the modifier which for some reason added another HostingView.

I am not sure why this happens, but avoid using AppStorage in the modifier
to make sure this doesn't happen again.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-02-28 19:42:20 -05:00
kingbri
bcdacdae06 Actions: Add release action
Signed-off-by: kingbri <bdashore3@proton.me>
2023-02-27 15:32:57 -05:00
kingbri
f8b6ea6ba7 Search: Add random text to the searchbar
It's redundant to have the navgiation title of the Search view as
"Search" and the searchbar to have the same title. Make the searchbar
have randomized quotes (from a fixed set) that doesn't repeat cases.

Maybe make this customizable in the future?

Signed-off-by: kingbri <bdashore3@proton.me>
2023-02-27 14:24:47 -05:00
kingbri
cbe3d17be1 Ferrite: Fix search and add progressive loading
The searchbar had a lot of lag when scrolling down the search
results view. This was due to a shared searchText variable which
updated every time the searchbar text changed and caused UI blocking.

Migrate searchText to a local variable and destroy the child
SearchResultsView as it's not needed at this time (may come back
with v0.7 due to searchable).

Also sources now display results progressively without a ProgressView
blocking when each source loads which allows the user to view media
faster.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-02-27 12:22:36 -05:00
kingbri
4a87d86e76 Ferrite: Add fixes for Introspect v0.2.2
Introspect now properly updates on every view lifecycle change, so
add a check to a reference on the UIHostingController and see if it
has been instantiated already.

Also clean up view struct names to reflect what is a modifier.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-02-18 11:39:03 -05:00