Exemple #1
0
        public GazelleTracker(IIndexerConfigurationService configService, Utils.Clients.WebClient webClient, Logger logger, IProtectionService protectionService, string name, string desc, string link, bool supportsFreeleechTokens, bool imdbInTags = false, bool has2Fa = false)
            : base(name: name,
                   description: desc,
                   link: link,
                   caps: new TorznabCapabilities(),
                   configService: configService,
                   client: webClient,
                   logger: logger,
                   p: protectionService,
                   configData: new ConfigurationDataBasicLogin())
        {
            Encoding = Encoding.UTF8;
            this.supportsFreeleechTokens = supportsFreeleechTokens;
            this.imdbInTags = imdbInTags;

            if (has2Fa)
            {
                var cookieHint = new ConfigurationData.DisplayItem(
                    "<ol><li>(use this only if 2FA is enabled for your account)</li><li>Login to this tracker with your browser<li>Open the <b>DevTools</b> panel by pressing <b>F12</b><li>Select the <b>Network</b> tab<li>Click on the <b>Doc</b> button<li>Refresh the page by pressing <b>F5</b><li>Select the <b>Headers</b> tab<li>Find 'cookie:' in the <b>Request Headers</b> section<li>Copy & paste the whole cookie string to here.</ol>")
                {
                    Name = "CookieHint"
                };
                configData.AddDynamic("cookieHint", cookieHint);
                var cookieItem = new ConfigurationData.StringItem {
                    Value = ""
                };
                cookieItem.Name = "Cookie";
                configData.AddDynamic("cookie", cookieItem);
            }

            if (supportsFreeleechTokens)
            {
                var useTokenItem = new ConfigurationData.BoolItem {
                    Value = false
                };
                useTokenItem.Name = "Use Freeleech Tokens when available";
                configData.AddDynamic("usetoken", useTokenItem);
            }
        }
Exemple #2
0
 public ConfigurationDataAPIKey()
 {
     Key = new ConfigurationData.StringItem {
         Name = "APIKey", Value = string.Empty
     };
 }