mirror of https://github.com/Jackett/Jackett
* DanishBits: add Passkey info to hopefully prevent #1892 #1873 #1850 **WARNING** this is a completely untested code change, as I don't have VS or a c# compiler. I simply made my best guess based on similar code I found in TorrentBytes.cs Please review carefully, and hopefully I haven't left anything out ;-) If you don't want me to make future changes like this without the required tools, then please let me know. Thanks. * Update DanishBits.cs * Update DanishBits.cs * Update DanishBits.cs * Update DanishBits.cs * Update DanishBits.cs * Update DanishBits.cs * Update ConfigurationDataUserPasskey.cs add display item instructions * Update DanishBits.cs switch to ConfigurationDataUserPasskey and drop unused using statements * Update CouchPotatoTracker.cs add ConfigurationDataUserPasskey ConfigData1 * Update CouchPotatoTracker.cs fix optional configData parm override * revert oops no, that wipes preloaded data :( * Update CouchPotatoTracker.cs add configurationDataUserPasskey as parameter
This commit is contained in:
parent
2ab6d13493
commit
851a4d30e1
|
@ -1,4 +1,4 @@
|
||||||
using Jackett.Models;
|
using Jackett.Models;
|
||||||
using Jackett.Models.IndexerConfig;
|
using Jackett.Models.IndexerConfig;
|
||||||
using Jackett.Services;
|
using Jackett.Services;
|
||||||
using Jackett.Utils;
|
using Jackett.Utils;
|
||||||
|
@ -23,7 +23,7 @@ namespace Jackett.Indexers.Abstract
|
||||||
set { base.configData = value; }
|
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,
|
: base(name: name,
|
||||||
description: description,
|
description: description,
|
||||||
link: link,
|
link: link,
|
||||||
|
@ -32,7 +32,8 @@ namespace Jackett.Indexers.Abstract
|
||||||
client: client,
|
client: client,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
p: p,
|
p: p,
|
||||||
configData: new ConfigurationDataUserPasskey())
|
configData: configData
|
||||||
|
)
|
||||||
{
|
{
|
||||||
this.endpoint = endpoint;
|
this.endpoint = endpoint;
|
||||||
TorznabCaps.SupportsImdbSearch = true;
|
TorznabCaps.SupportsImdbSearch = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using Jackett.Models;
|
using Jackett.Models;
|
||||||
using Jackett.Services;
|
using Jackett.Services;
|
||||||
using Jackett.Utils.Clients;
|
using Jackett.Utils.Clients;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
@ -7,11 +7,18 @@ using Jackett.Indexers.Abstract;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using Jackett.Models.IndexerConfig;
|
||||||
|
|
||||||
namespace Jackett.Indexers
|
namespace Jackett.Indexers
|
||||||
{
|
{
|
||||||
public class DanishBits : CouchPotatoTracker
|
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)
|
public DanishBits(IIndexerConfigurationService configService, IWebClient c, Logger l, IProtectionService ps)
|
||||||
: base(name: "DanishBits",
|
: base(name: "DanishBits",
|
||||||
description: "A danish closed torrent tracker",
|
description: "A danish closed torrent tracker",
|
||||||
|
@ -20,7 +27,8 @@ namespace Jackett.Indexers
|
||||||
configService: configService,
|
configService: configService,
|
||||||
client: c,
|
client: c,
|
||||||
logger: l,
|
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");
|
Encoding = Encoding.GetEncoding("UTF-8");
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
namespace Jackett.Models.IndexerConfig
|
namespace Jackett.Models.IndexerConfig
|
||||||
{
|
{
|
||||||
public class ConfigurationDataUserPasskey : ConfigurationData
|
public class ConfigurationDataUserPasskey : ConfigurationData
|
||||||
{
|
{
|
||||||
public StringItem Username { get; private set; }
|
public StringItem Username { get; private set; }
|
||||||
public StringItem Passkey { get; private set; }
|
public StringItem Passkey { get; private set; }
|
||||||
|
public DisplayItem Instructions { get; private set; }
|
||||||
|
|
||||||
public ConfigurationDataUserPasskey(string instructionMessageOptional = null)
|
public ConfigurationDataUserPasskey(string instructionMessageOptional = null)
|
||||||
{
|
{
|
||||||
Username = new StringItem { Name = "Username" };
|
Username = new StringItem { Name = "Username" };
|
||||||
Passkey = new StringItem { Name = "Passkey" };
|
Passkey = new StringItem { Name = "Passkey" };
|
||||||
|
Instructions = new DisplayItem(instructionMessageOptional) { Name = "" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue