danishbits: gone. removed. resolves #9949

This commit is contained in:
Garfield69 2020-10-24 06:47:21 +13:00
parent 9e1be7f70b
commit 45a9cf7873
2 changed files with 0 additions and 85 deletions

View File

@ -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

View File

@ -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>
{
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep
},
MovieSearchParams = new List<MovieSearchParam>
{
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<WebResult> RequestWithCookiesAsync(
string url, string cookieOverride = null, RequestType method = RequestType.GET, string referer = null,
IEnumerable<KeyValuePair<string, string>> data = null, Dictionary<string, string> 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);
}
}
}