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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
The overall UI of Ferrite has been changed to make animations smoother
and streamline the experiences.
A new search filter interface has been added for all iOS versions,
but iOS 15 and up have smooth UI applied due to bugs with searchbars
in iOS 14 (which shouldn't even have a searchbar in the first place).
Also fix the plugin fetching logic to not listen to a combine publisher
and instead use a notification that is easier to control.
Signed-off-by: kingbri <bdashore3@proton.me>
The subName parameter is for aggregate sources that pull from a
child website. Make it so it's possible to include that child
site in parsers.
Also remove the magnet link/hash requirement since it's filtered out
anyways after results are fetched.
Signed-off-by: kingbri <bdashore3@proton.me>
Only entries from the first plugin list would be shown in plugins.
This was because the availableSources array was set every time a list
was iterated upon.
Signed-off-by: kingbri <bdashore3@proton.me>
onAppear does not fire properly on iOS 14 due to a longstanding
bug in SwiftUI. Add a UIKit onAppear hook for listening to these
events and implement inside the backport namespace.
Signed-off-by: kingbri <bdashore3@proton.me>
Plugins are now a unified format for both sources and actions. Actions
dictate what to do with a link and can now be added through a plugin
JSON file.
Backups have also been versioned to improve performance and add action
support.
Tags are used to give small amounts of information before a user
installs a plugin.
Signed-off-by: kingbri <bdashore3@proton.me>
Adding the ability to send sort descriptors adds more flexibility
for the DynamicFetchRequest backport. Use this to fix bookmarks sorting.
Signed-off-by: kingbri <bdashore3@proton.me>
Add a searchbar to filter through various library entries so it's
easier to find items.
Also add fixes for < iOS 16 devices and fix up searchbar constraints.
Signed-off-by: kingbri <bdashore3@proton.me>
This commit adds support for viewing a user's AllDebrid magnet list.
AllDebrid does not save unlocked links, but they do save which magnets
a user has queried.
Also clean up various functions in DebridManager.
Signed-off-by: kingbri <bdashore3@proton.me>
Error handling can be tedious with debrid because network errors
to ignore are present (such as -999). Create a function to properly
display the errors to the user and log them via print statments.
Signed-off-by: kingbri <bdashore3@proton.me>
This is required for PM's cloud since transfers will also add the
files to a user's cloud rather than just fetching the DDL link.
Signed-off-by: kingbri <bdashore3@proton.me>
Magnets are expressed in two different ways: a hash and a link. Both
of these mean the same thing with a magnet link giving more information
if required.
However, there was a disconnect if a hash was present or a link was
present and required many steps to check which was available. Unify
magnets by creating a parent structure that attempts to extract
the hash or create a link in the event that either parameter isn't
provided.
Replace everything except bookmarks (to prevent CoreData complaints
and unnecessary abstraction) to use the new Magnet system.
Signed-off-by: kingbri <bdashore3@proton.me>
Add the ability to view a user's Premiumize files in Ferrite. Files
can be deleted from a user's account directly in Ferrite's list.
Signed-off-by: kingbri <bdashore3@proton.me>
RealDebrid saves a user's unrestricted links and "torrents" (magnet
links in this case). Add the ability to see and queue a user's RD
library in Ferrite itself.
This required a further abstraction of the debrid manager to allow
for more types other than search results to be passed to various
functions.
Deleting an item from RD's cloud list deletes the item from RD as well.
NOTE: This does not track download progress, but it does show if a
magnet is currently being downloaded or not.
Signed-off-by: kingbri <bdashore3@proton.me>
Transitioning the navigation title to inline while editing search
broke for older OS versions. Make a more bulletproof solution to
inline the navigation title when the user commits a search as that's
a definitive event to listen to.
Signed-off-by: kingbri <bdashore3@proton.me>
NotificationCenter posts to other instances of the same button
caused the existing bookmark reference to be nullified for every other
button.
Add a comparison between object IDs to make sure the correct instances
are being nullified.
Signed-off-by: kingbri <bdashore3@proton.me>
Titles weren't cleared on sheet dismiss which caused conflicts between
batches and single files. Fix this.
Signed-off-by: kingbri <bdashore3@proton.me>