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>
Premiumize has a dynamic upper limit of 107-110 (from testing)
hashes per request. To play it safe, cache requests are split by
100 and executed in parallel as 2 (or more) requests.
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>
I mistakenly added an and condition which caused all debrid services
to fail unless the user is using Premiumize.
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>
- Make history buttons have 2 lines of text to give more context.
If a batch is given, the full episode name is shown
- Add a "now playing" section to player choices to show what the user
will play in the event of a misclick
- Make the maximum line limit in search results 4 lines to prevent
long title results from taking up the entire cell
- Fix light theme appearance with library since the picker and list
weren't aligned right
Signed-off-by: kingbri <bdashore3@proton.me>
Backups in Ferrite archive a user's bookmarks, history, source lists,
and source names. Sources are not archived due to the size of the backup
increasing exponentially.
These files use the .feb format to avoid JSON conflicts when opening
the file in Ferrite. The backup file can be renamed to JSON for editing
at any time.
Add the Backport namespace to be used for ported features rather
than making a file for every iOS 14 adaptation.
Move history and bookmark creation to the PersistenceController rather
than individual functions.
Signed-off-by: kingbri <bdashore3@proton.me>
Use strict concurrency checking in Xcode 14 to find misuses with
Swift concurrency.
Cleanup files and rearrange them along with fixing comment headers.
Signed-off-by: kingbri <bdashore3@proton.me>
To declutter a RealDebrid user's library, check if the file and
unrestricted link exist and serve those existing links. Otherwise
perform a download like normal.
Sometimes RealDebrid deletes cached items, but still keeps them on
instant availability. Add a way to tell the user that the item
is downloading along with an option to cancel it.
Also remove unnecessary published variables from viewmodels
Signed-off-by: kingbri <bdashore3@proton.me>
Action history is logged and displayed to the user's library.
These are triggered whenever the magnet choice sheet is displayed.
Also redo alerts and action sheets to avoid deprecation notices
for >iOS 14. These will be removed when iOS 14 support is dropped.
There was also a problem with sheet presentation not working after
a sheet was dismissed. Disable the appropriate view when a sheet
is being presented.
Signed-off-by: kingbri <bdashore3@proton.me>
Bookmarks are added through search results and can be accessed through
the library. These can be moved and deleted within the list.
Add a RealDebrid instant availability cache for bookmark IA status
to not overwhelm the API. Instant availability results are fresh on
every search results since the cache is cleared.
Also don't require a source API object to be present for the API parser
button in source settings. If a JSON parser exists for a source, allow
the option to be presented.
Signed-off-by: kingbri <bdashore3@proton.me>
- Make searching case insensitive
- Fix catalog title not hiding when searching an installed source name
- Cancelling a search doesn't add an installed source to the catalog
- Add dynamic predicate changing for iOS 14 and up instead of restricting
to iOS 15
- Migrate updated source fetching to the source model
- Change how filtering works to adapt with the dynamic predicate
changes
Signed-off-by: kingbri <bdashore3@proton.me>
Co-authored-by: kingbri <bdashore3@proton.me>
- Migrate the empty view to a common view which vertically centers
itself to the screen's bounds
- Don't initialize underlying state variables in init as this is
discouraged behavior. Instead, hook the source list editor to an ID
that refreshes when an existing source list URL has been set
Signed-off-by: kingbri <bdashore3@proton.me>
The inset grouped list style has a top inset that adds extra space
between the navigation bar title and the list rows. Use introspect
to remove this space on UITableView and UICollectionView (for iOS 16).
Sections completely ignore the introspect changes, so add a section
header which removes the list row insets.
Signed-off-by: kingbri <bdashore3@proton.me>