OffCloud is a debrid provider that allows for caching and playing
media. Does not have rich debrid support.
Also add a handler if functionality isn't implemented in the service.
Signed-off-by: kingbri <bdashore3@proton.me>
Some debrid services aren't "rich", which means that they don't
broadcast whether an instantly available torrent is a batch or a
single file. This results in all torrents either having the green
badge or red badge based on what hash is given.
However, batches need to intercept the download itself which requires
the download function to be split into download and unrestrict. In
between, there's room for the batch sheet to act.
Signed-off-by: kingbri <bdashore3@proton.me>
Adds HTTP method, headers, and a body string. Also use a common
function to substitute params rather to allow for maintanence of a
common dictionary.
Signed-off-by: kingbri <bdashore3@proton.me>
Protocols can't be used in ObservedObjects. Observable in iOS 17
and up solves this, but Ferrite targets iOS 16 and up, so add a
type-erased StateObject which supports protocols.
Signed-off-by: kingbri <bdashore3@proton.me>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This automatically embeds the commit hash and if the build is an
actions nightly or not which will help with debugging crashes.
Signed-off-by: kingbri <bdashore3@proton.me>
Premiumize is another debrid provider. Add support in addition
to other debrid services.
Add a unified Magnet type that encloses both the link and hash
when needed for certain services.
A universal ASAuthenticationSession has been added to make implicit
authentication easier for services that support it.
Clean up declarations of certain variables that were mismanaged
during the debrid decentralization process.
Signed-off-by: kingbri <bdashore3@proton.me>
AllDebrid is another debrid provider. Add support to Ferrite in
addition to RealDebrid.
The overall debrid login backend has changed to accomodate for a more
agnostic app structure where more services can be added as needed.
Also add some cosmetic changes to search so filters can be added while
searching for a phrase.
Signed-off-by: kingbri <bdashore3@proton.me>