From 45a9cf7873827e83a4d6732d2cbdb2408e9be27a Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Sat, 24 Oct 2020 06:47:21 +1300 Subject: [PATCH] danishbits: gone. removed. resolves #9949 --- README.md | 1 - src/Jackett.Common/Indexers/DanishBits.cs | 84 ----------------------- 2 files changed, 85 deletions(-) delete mode 100644 src/Jackett.Common/Indexers/DanishBits.cs diff --git a/README.md b/README.md index 065bd2d82..c4c00459c 100644 --- a/README.md +++ b/README.md @@ -295,7 +295,6 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/ * CrazyHD * CrazySpirits * CrnaBerza - * DanishBits (DB) * Darius Tracker * Dark-Shadow * Dark Tracker diff --git a/src/Jackett.Common/Indexers/DanishBits.cs b/src/Jackett.Common/Indexers/DanishBits.cs deleted file mode 100644 index 4323283f3..000000000 --- a/src/Jackett.Common/Indexers/DanishBits.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Jackett.Common.Indexers.Abstract; -using Jackett.Common.Models; -using Jackett.Common.Models.IndexerConfig; -using Jackett.Common.Services.Interfaces; -using Jackett.Common.Utils.Clients; -using NLog; - -namespace Jackett.Common.Indexers -{ - [ExcludeFromCodeCoverage] - public class DanishBits : CouchPotatoTracker - { - public override string[] LegacySiteLinks { get; protected set; } = { - "http://danishbits.org/" - }; - - private new ConfigurationDataUserPasskey configData - { - get => (ConfigurationDataUserPasskey)base.configData; - set => base.configData = value; - } - - public DanishBits(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps) - : base(id: "danishbits", - name: "DanishBits", - description: "A danish closed torrent tracker", - link: "https://danishbits.org/", - caps: new TorznabCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - } - }, - configService: configService, - client: wc, - logger: l, - 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."), - endpoint: "couchpotato.php") - { - Encoding = Encoding.UTF8; - Language = "da-dk"; - Type = "private"; - - AddCategoryMapping("movie", TorznabCatType.Movies); - AddCategoryMapping("tv", TorznabCatType.TV); - AddCategoryMapping("blandet", TorznabCatType.Other); // e.g. games - } - - protected override string GetSearchString(TorznabQuery query) - { - if (string.IsNullOrEmpty(query.SearchTerm) && string.IsNullOrEmpty(query.ImdbID)) - { - return "%"; - } - var searchString = query.GetQueryString(); - var ReplaceRegex = new Regex("[^a-zA-Z0-9]+"); - searchString = ReplaceRegex.Replace(searchString, "%"); - return searchString; - } - - protected override async Task RequestWithCookiesAsync( - string url, string cookieOverride = null, RequestType method = RequestType.GET, string referer = null, - IEnumerable> data = null, Dictionary headers = null, - string rawbody = null, bool? emulateBrowser = null) - { - CookieHeader = null; // Download fill fail with cookies set - return await base.RequestWithCookiesAsync(url, cookieOverride, method, referer, data, headers); - } - } -}