diff --git a/src/Jackett/Indexers/Abstract/CouchPotatoTracker.cs b/src/Jackett/Indexers/Abstract/CouchPotatoTracker.cs index 9b8123d2a..f1f53ff5c 100644 --- a/src/Jackett/Indexers/Abstract/CouchPotatoTracker.cs +++ b/src/Jackett/Indexers/Abstract/CouchPotatoTracker.cs @@ -1,4 +1,4 @@ -using Jackett.Models; +using Jackett.Models; using Jackett.Models.IndexerConfig; using Jackett.Services; using Jackett.Utils; @@ -23,7 +23,7 @@ namespace Jackett.Indexers.Abstract set { base.configData = value; } } - public CouchPotatoTracker(IIndexerConfigurationService configService, IWebClient client, Logger logger, IProtectionService p, string name, string description, string link, string endpoint) + public CouchPotatoTracker(IIndexerConfigurationService configService, IWebClient client, Logger logger, IProtectionService p, ConfigurationDataUserPasskey configData, string name, string description, string link, string endpoint) : base(name: name, description: description, link: link, @@ -32,7 +32,8 @@ namespace Jackett.Indexers.Abstract client: client, logger: logger, p: p, - configData: new ConfigurationDataUserPasskey()) + configData: configData + ) { this.endpoint = endpoint; TorznabCaps.SupportsImdbSearch = true; diff --git a/src/Jackett/Indexers/DanishBits.cs b/src/Jackett/Indexers/DanishBits.cs index ae7021bf2..fc3487ae6 100644 --- a/src/Jackett/Indexers/DanishBits.cs +++ b/src/Jackett/Indexers/DanishBits.cs @@ -1,4 +1,4 @@ -using Jackett.Models; +using Jackett.Models; using Jackett.Services; using Jackett.Utils.Clients; using NLog; @@ -7,11 +7,18 @@ using Jackett.Indexers.Abstract; using System.Collections.Generic; using System.Threading.Tasks; using System.Text.RegularExpressions; +using Jackett.Models.IndexerConfig; namespace Jackett.Indexers { public class DanishBits : CouchPotatoTracker { + new ConfigurationDataUserPasskey configData + { + get { return (ConfigurationDataUserPasskey)base.configData; } + set { base.configData = value; } + } + public DanishBits(IIndexerConfigurationService configService, IWebClient c, Logger l, IProtectionService ps) : base(name: "DanishBits", description: "A danish closed torrent tracker", @@ -20,8 +27,9 @@ namespace Jackett.Indexers configService: configService, client: c, logger: l, - p: ps - ) + p: ps, + configData: new ConfigurationDataUserPasskey("Note about Passkey: This is not your login Password. Find the Passkey by logging into DanishBits with your Browser, and under your account page you'll see your passkey under the 'Personal' section on the left side.") + ) { Encoding = Encoding.GetEncoding("UTF-8"); Language = "da-dk"; diff --git a/src/Jackett/Models/IndexerConfig/ConfigurationDataUserPasskey.cs b/src/Jackett/Models/IndexerConfig/ConfigurationDataUserPasskey.cs index 7f41230f1..38511ea3f 100644 --- a/src/Jackett/Models/IndexerConfig/ConfigurationDataUserPasskey.cs +++ b/src/Jackett/Models/IndexerConfig/ConfigurationDataUserPasskey.cs @@ -1,14 +1,16 @@ -namespace Jackett.Models.IndexerConfig +namespace Jackett.Models.IndexerConfig { public class ConfigurationDataUserPasskey : ConfigurationData { public StringItem Username { get; private set; } public StringItem Passkey { get; private set; } + public DisplayItem Instructions { get; private set; } public ConfigurationDataUserPasskey(string instructionMessageOptional = null) { Username = new StringItem { Name = "Username" }; Passkey = new StringItem { Name = "Passkey" }; + Instructions = new DisplayItem(instructionMessageOptional) { Name = "" }; } } }