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>
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>
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>
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>
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>
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>
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>
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>
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>
A version string will not allow for comparisions when checking
to update a source. Make the type an integer instead on both the
model and coredata store.
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>
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>