mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Feature/cleaning up aggregate indexer fallback (#1507)
* Line endings... * Refactoring how MetaIndexers handle fallbacks Originally this modification was part of a much larger refactoring, however for the sake of reviewability I split it into smaller chunks. Sadly it is still quite large. I wanted to split it even more, however after a certain point there was really no value in creating smaller chunks. The biggest part of this modification would be still huge. So all in all, there're 3 aspects of this modification - It modifies BaseIndexer so that it now implements IIndexer (will be very useful later on) - Resolving most of the warnings currently in Jackett (the only ones remaining are related to Autofac, however if I could I would just burn Autofac altogether rather than fix the warnings. Will open discussion on this.) - Biggest part: refactoring how MetaIndexers handle fallbacks and how they provide the final result set MetaIndexers now accept any kind of fallback and filtering mechanism that implements the necessary interface, so that in the future IMDB fallback and filtering won't be the only one. I know there are not a lot of unit tests around Jackett at the moment, however this renders the class much more unittestable as well. * Autofac started complaining... I don't understand...
This commit is contained in:
@@ -19,7 +19,7 @@ using Jackett.Utils;
|
||||
|
||||
namespace Jackett.Indexers
|
||||
{
|
||||
public class MoreThanTV : BaseIndexer, IIndexer
|
||||
public class MoreThanTV : BaseIndexer
|
||||
{
|
||||
private string LoginUrl => SiteLink + "login.php";
|
||||
private string SearchUrl => SiteLink + "ajax.php?action=browse&searchstr=";
|
||||
@@ -45,7 +45,7 @@ namespace Jackett.Indexers
|
||||
Type = "private";
|
||||
}
|
||||
|
||||
public async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||
{
|
||||
LoadValuesFromJson(configJson);
|
||||
var pairs = new Dictionary<string, string> {
|
||||
@@ -69,7 +69,7 @@ namespace Jackett.Indexers
|
||||
return IndexerConfigurationStatus.RequiresTesting;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
public override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
var isTv = TorznabCatType.QueryContainsParentCategory(query.Categories, new List<int> { TorznabCatType.TV.ID });
|
||||
var releases = new List<ReleaseInfo>();
|
||||
|
Reference in New Issue
Block a user