Commit graph

10 commits

Author SHA1 Message Date
kingbri
3195d74eea Ferrite: Cleanup and refine backend
- 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>
2022-08-31 00:41:38 -04:00
kingbri
59ee4f7a2a Error: Replace the cancel error user-side
If a Task is cancelled, this was deliberate and prevent a huge error
from showing up on the user side.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-31 00:41:38 -04:00
kingbri
cab6eb3bb6 Sources: Allow for dynamic properties and basic API usage
Some sources are self-hosted and require unique keys and sever
addresses.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-31 00:41:38 -04:00
kingbri
c82cb1819d Searching: Cleanup existing searches
If a user searched after cancelling the search the first time,
the first search would still continue.

Assign the search task to navigation view and automatically cancel
it and dismiss the searchbar when the user switches to a different
tab.

Also add a ProgressView to show which source is being parsed.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-31 00:41:38 -04:00
kingbri
bb481f471e Ferrite: Format
Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-31 00:41:38 -04:00
kingbri
064a68fbb2 Sources: Add RSS, descriptions, and settings
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>
2022-08-31 00:41:38 -04:00
kingbri
940f8337a5 Ferrite: Overhaul sources
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>
2022-08-31 00:41:38 -04:00
kingbri
64798a172a Scraping: Remove workaround for last-child
Last-child is not supported on SwiftSoup, but nth-last-child is.
Therefore, sources must use nth-child or nth-last-child instead of
the first-child and last-child aliases.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-31 00:41:38 -04:00
kingbri
119a3a18b1 SearchResults: Add source filtering
Presenting all source results can be annoying to a user. Add filtering
to filter by a specific source.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00
kingbri
1eef8202ca Ferrite: Decouple torrent sources
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>
2022-08-04 21:33:59 -04:00
Renamed from Ferrite/Models/ScrapingViewModel.swift (Browse further)