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>
- 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>
Updates are sent via an alert on starting the app. This can be
disabled in the settings menu.
A full version struct has been completed for flexible comparisons.
Version history can also be viewed in settings in case a user wants
to download an earlier version of the app.
Updates track Github releases.
Signed-off-by: kingbri <bdashore3@gmail.com>
When a search result is selected, there is usually a delay due to
the debrid dance of API routes for grabbing a download link to stream.
Add a loading indicator and prevent any other tasks from loading
unless the user cancels it.
iOS 14.5 was a huge update which added many QoL SwiftUI changes that
are consistent to modern iOS versions.
However, Ferrite supports iOS versions less than 14.5, mainly 14.3.
More fixes had to be added to make sure UI is consistent across
all OS versions.
Signed-off-by: kingbri <bdashore3@gmail.com>
If a minimum app version is specified, certain app versions cannot
use a source until the user is updated to the supported app version.
This does not require any changes to CoreData.
Signed-off-by: kingbri <bdashore3@gmail.com>
If a website times out, use the fallback options. The data URL
request now has a hard timeout of 15 seconds.
This only works for the base URL of a source, if an RSS url or
API url is provided, fallback URLs won't be used and the request
will fail.
Signed-off-by: kingbri <bdashore3@gmail.com>
Adds support for website APIs both complex and simple. This commit
only supports GET requests to APIs. POST request support can be added
on request.
Client IDs and secrets are also supported. They can be added via
source settings or automatically set by a website endpoint.
Also fetch sources for scraping using the backgroundContext and remove
some functions from using the main actor.
Signed-off-by: kingbri <bdashore3@gmail.com>
Since an existing source list is fetched from the ViewContext, save
in the scope of that context. This will fix any fetching issues
when grabbing sources from the new URL.
Signed-off-by: kingbri <bdashore3@gmail.com>
- Fix how abrupt search cancellations work
- Add a no results prompt if no results are found
- Clean up how scraping model results are returned on error
- Allow a base URL and dynamic base URL to be provided together
Signed-off-by: kingbri <bdashore3@gmail.com>
Sources can now be updated based on the repo ID. To preserve repo IDs
across single URL links, the source lists can be edited and the ID
is transferred over.
Signed-off-by: kingbri <bdashore3@gmail.com>
List IDs are used to link a source list with an actual source. Each
list entry has a unique ID that a user can compare with a source
to see if it's legitimate.
Source IDs are just identifiers for sources. Not sure what to do with
these yet but they may be useful for the future.
Signed-off-by: kingbri <bdashore3@gmail.com>
RSS parsing has been added as a method to parse source since they're
easier on the website's end to parse.
Source settings have been added. The only current setting is the fetch
mode which selects which parser/scraper to use. By default, if an RSS
parser is found, it's selected.
A source now has info shown regarding versioning and authorship. A source
list's repository name and author string are now required.
Signed-off-by: kingbri <bdashore3@gmail.com>
Sources are now completely changed to use a more flexible API. This
uses a fully native source system, so there will be 0 overhead on
resource usage and performance.
JSON objects specify what is fetched and displayed by Ferrite when
searching torrents.
Sources now include sizes, seeders, and leechers for any site that
specifies them.
The versioning and repo naming framework has been added, but will be
displayed in another update.
API support will be included in another update.
Signed-off-by: kingbri <bdashore3@gmail.com>
I was accidentally calling dismiss on failure which dismisses the
alert and breaks how presentation is handled on sheets.
Signed-off-by: kingbri <bdashore3@gmail.com>
These sources will be converted to be more flexible with JavaScript
in the future.
The source catalog is populated by adding a source list in settings
then installing a source from the catalog.
Sources can be enabled or disabled when using Ferrite.
Signed-off-by: kingbri <bdashore3@gmail.com>