From 8d921202fa0b0fdddb89310a60a5fe2e62ca8275 Mon Sep 17 00:00:00 2001 From: flightlevel Date: Sun, 6 May 2018 10:36:53 +1000 Subject: [PATCH] Animebytes username requirement (#3076) --- src/Jackett.Common/Indexers/AnimeBytes.cs | 3 ++- .../IndexerConfig/Bespoke/ConfigurationDataAnimeBytes.cs | 5 +++-- .../Models/IndexerConfig/ConfigurationDataUserPasskey.cs | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Jackett.Common/Indexers/AnimeBytes.cs b/src/Jackett.Common/Indexers/AnimeBytes.cs index 183a5cc6f..c7494ce5a 100644 --- a/src/Jackett.Common/Indexers/AnimeBytes.cs +++ b/src/Jackett.Common/Indexers/AnimeBytes.cs @@ -49,7 +49,7 @@ namespace Jackett.Common.Indexers TorznabCatType.AudioOther), logger: l, p: ps, - configData: new ConfigurationDataAnimeBytes()) + configData: new ConfigurationDataAnimeBytes("Note about Passkey: This is not your login Password. Find the Passkey by logging into AnimeBytes with your browser")) { Encoding = Encoding.UTF8; Language = "en-us"; @@ -139,6 +139,7 @@ namespace Jackett.Common.Indexers cat = queryCats.First().ToString(); } + queryCollection.Add("username", configData.Username.Value); queryCollection.Add("torrent_pass", configData.Passkey.Value); queryCollection.Add("type", searchType); queryCollection.Add("searchstr", searchTerm); diff --git a/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataAnimeBytes.cs b/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataAnimeBytes.cs index 930ba5d68..d4259d9ee 100644 --- a/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataAnimeBytes.cs +++ b/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataAnimeBytes.cs @@ -1,6 +1,6 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke { - class ConfigurationDataAnimeBytes : ConfigurationDataPasskey + class ConfigurationDataAnimeBytes : ConfigurationDataUserPasskey { public BoolItem IncludeRaw { get; private set; } //public DisplayItem DateWarning { get; private set; } @@ -8,7 +8,7 @@ public BoolItem AddSynonyms { get; private set; } public BoolItem FilterSeasonEpisode { get; private set; } - public ConfigurationDataAnimeBytes() + public ConfigurationDataAnimeBytes(string instructionMessageOptional = null) : base() { IncludeRaw = new BoolItem() { Name = "IncludeRaw", Value = false }; @@ -16,6 +16,7 @@ InsertSeason = new BoolItem() { Name = "Prefix episode number with E0 for Sonarr Compatability", Value = false }; AddSynonyms = new BoolItem() { Name = "Add releases for each synonym title", Value = true }; FilterSeasonEpisode = new BoolItem() { Name = "Filter results by season/episode", Value = false }; + Instructions = new DisplayItem(instructionMessageOptional) { Name = "" }; } } } diff --git a/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataUserPasskey.cs b/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataUserPasskey.cs index f6f422caf..43763b0d7 100644 --- a/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataUserPasskey.cs +++ b/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataUserPasskey.cs @@ -4,7 +4,7 @@ namespace Jackett.Common.Models.IndexerConfig { public StringItem Username { get; private set; } public StringItem Passkey { get; private set; } - public DisplayItem Instructions { get; private set; } + public DisplayItem Instructions { get; protected set; } public ConfigurationDataUserPasskey(string instructionMessageOptional = null) {