I have a feeling I'm breaking the world and bringing the apocalypse

It's quite hard to encapsulate something this large. This refactor
contains multiple attacks on the current architecture and is changing
things that were probably created quite a while back then. Luckily this
was done in increments so it mustn't be that impossible to recall what
has been done. I just need to relax my memory a little bit.

So the basic idea was quite simple. Let's distingush metas and normal
indexers a little bit more. Both of them were originating from
BaseIndexer, however very little of the functionality was actually
shared between them. Actually quite a few things made it even harder to
implement a different kind of indexer, especially for a newcomer for
both Jackett and C#.

Then in order to further reduce whatever was encapsulated in
any kind of, a couple things had to be changed. Like CardigannIndexer,
which probably had quite a mindshift change. IndexerManager and the
configuration management were also encapsulated and refactored, and now
I have a feeling that although the code could be improved, at least the
responsibilities of services and what they actually do is now clearer.

Anyhow, it would be safe to assume that I will not be able to go
step-by-step and define everything that has been changed. I'm sorry.
This commit is contained in:
chibidev
2017-07-10 22:58:44 +02:00
committed by kaso17
parent 35103206cf
commit 9e3076dde6
104 changed files with 1188 additions and 1102 deletions

View File

@@ -19,7 +19,7 @@ using Jackett.Utils;
namespace Jackett.Indexers
{
public class MoreThanTV : BaseIndexer
public class MoreThanTV : BaseWebIndexer
{
private string LoginUrl => SiteLink + "login.php";
private string SearchUrl => SiteLink + "ajax.php?action=browse&searchstr=";
@@ -28,13 +28,13 @@ namespace Jackett.Indexers
private ConfigurationDataBasicLogin ConfigData => (ConfigurationDataBasicLogin) configData;
public MoreThanTV(IIndexerManagerService i, IWebClient c, Logger l, IProtectionService ps)
public MoreThanTV(IIndexerConfigurationService configService, IWebClient c, Logger l, IProtectionService ps)
: base(name: "MoreThanTV",
description: "ROMANIAN Private Torrent Tracker for TV / MOVIES, and the internal tracker for the release group DRACULA.",
link: "https://www.morethan.tv/",
caps: new TorznabCapabilities(TorznabCatType.TV,
TorznabCatType.Movies),
manager: i,
configService: configService,
client: c,
logger: l,
p: ps,