C# Class Jackett.Indexers.BaseIndexer

Show file Open project: Jackett/Jackett

Protected Properties

Property Type Description
cache List
cacheTime System.TimeSpan
configData ConfigurationData
downloadUrlBase string
indexerService IIndexerManagerService
logger Logger
protectionService IProtectionService
webclient Jackett.Utils.Clients.IWebClient

Public Methods

Method Description
BaseIndexer ( IIndexerManagerService manager, IWebClient client, Logger logger, IProtectionService p ) : System
BaseIndexer ( string name, string link, string description, IIndexerManagerService manager, IWebClient client, Logger logger, ConfigurationData configData, IProtectionService p, TorznabCapabilities caps = null, string downloadBase = null ) : System
CleanLinks ( IEnumerable releases ) : IEnumerable
Download ( Uri link ) : Task
FilterResults ( TorznabQuery query, IEnumerable results ) : IEnumerable
GetConfigurationForSetup ( ) : Task
GetIndexerID ( Type type ) : string
LoadFromSavedConfiguration ( JToken jsonConfig ) : void
ResetBaseConfig ( ) : void
UncleanLink ( Uri link ) : Uri

Protected Methods

Method Description
AddCategoryMapping ( int trackerCategory, TorznabCategory newznabCategory, string trackerCategoryDesc = null ) : void
AddCategoryMapping ( string trackerCategory, TorznabCategory newznabCategory, string trackerCategoryDesc = null ) : void
AddMultiCategoryMapping ( TorznabCategory newznabCategory ) : void
CleanCache ( ) : void
ConfigureIfOK ( string cookies, bool isLoggedin, Func onError ) : Task
FollowIfRedirect ( WebClientByteResult response, string referrer = null, string overrideRedirectUrl = null, string overrideCookies = null, bool accumulateCookies = false ) : Task
FollowIfRedirect ( WebClientStringResult response, string referrer = null, string overrideRedirectUrl = null, string overrideCookies = null, bool accumulateCookies = false ) : Task
LoadLegacyCookieConfig ( JToken jsonConfig ) : void
MapTorznabCapsToTrackers ( TorznabQuery query, bool mapChildrenCatsToParent = false ) : List
MapTrackerCatDescToNewznab ( string input ) : int
MapTrackerCatToNewznab ( string input ) : int
OnParseError ( string results, Exception ex ) : void
PostDataWithCookies ( string url, string>.IEnumerable data, string cookieOverride = null, string referer = null, string>.Dictionary headers = null, string rawbody = null, bool emulateBrowser = null ) : Task
PostDataWithCookiesAndRetry ( string url, string>.IEnumerable data, string cookieOverride = null, string referer = null, string>.Dictionary headers = null, string rawbody = null, bool emulateBrowser = null ) : Task
RequestBytesWithCookies ( string url, string cookieOverride = null ) : Task
RequestBytesWithCookiesAndRetry ( string url, string cookieOverride = null ) : Task
RequestLoginAndFollowRedirect ( string url, string>.IEnumerable data, string cookies, bool returnCookiesFromFirstCall, string redirectUrlOverride = null, string referer = null, bool accumulateCookies = false ) : Task
RequestStringWithCookies ( string url, string cookieOverride = null, string referer = null, string>.Dictionary headers = null ) : Task
RequestStringWithCookiesAndRetry ( string url, string cookieOverride = null, string referer = null, string>.Dictionary headers = null ) : Task
SaveConfig ( ) : void
UpdateCookieHeader ( string newCookies, string cookieOverride = null ) : void

Private Methods

Method Description
DoFollowIfRedirect ( WebClientByteResult incomingResponse, string referrer = null, string overrideRedirectUrl = null, string overrideCookies = null, bool accumulateCookies = false ) : Task
ResolveCookies ( String incomingCookies = "" ) : String

Method Details

AddCategoryMapping() protected method

protected AddCategoryMapping ( int trackerCategory, TorznabCategory newznabCategory, string trackerCategoryDesc = null ) : void
trackerCategory int
newznabCategory Jackett.Models.TorznabCategory
trackerCategoryDesc string
return void

AddCategoryMapping() protected method

protected AddCategoryMapping ( string trackerCategory, TorznabCategory newznabCategory, string trackerCategoryDesc = null ) : void
trackerCategory string
newznabCategory Jackett.Models.TorznabCategory
trackerCategoryDesc string
return void

AddMultiCategoryMapping() protected method

protected AddMultiCategoryMapping ( TorznabCategory newznabCategory ) : void
newznabCategory Jackett.Models.TorznabCategory
return void

BaseIndexer() public method

public BaseIndexer ( IIndexerManagerService manager, IWebClient client, Logger logger, IProtectionService p ) : System
manager IIndexerManagerService
client Jackett.Utils.Clients.IWebClient
logger Logger
p IProtectionService
return System

BaseIndexer() public method

public BaseIndexer ( string name, string link, string description, IIndexerManagerService manager, IWebClient client, Logger logger, ConfigurationData configData, IProtectionService p, TorznabCapabilities caps = null, string downloadBase = null ) : System
name string
link string
description string
manager IIndexerManagerService
client Jackett.Utils.Clients.IWebClient
logger Logger
configData ConfigurationData
p IProtectionService
caps Jackett.Models.TorznabCapabilities
downloadBase string
return System

CleanCache() protected method

protected CleanCache ( ) : void
return void

CleanLinks() public method

public CleanLinks ( IEnumerable releases ) : IEnumerable
releases IEnumerable
return IEnumerable

ConfigureIfOK() protected method

protected ConfigureIfOK ( string cookies, bool isLoggedin, Func onError ) : Task
cookies string
isLoggedin bool
onError Func
return Task

Download() public method

public Download ( Uri link ) : Task
link System.Uri
return Task

FilterResults() public method

public FilterResults ( TorznabQuery query, IEnumerable results ) : IEnumerable
query Jackett.Models.TorznabQuery
results IEnumerable
return IEnumerable

FollowIfRedirect() protected method

protected FollowIfRedirect ( WebClientByteResult response, string referrer = null, string overrideRedirectUrl = null, string overrideCookies = null, bool accumulateCookies = false ) : Task
response Jackett.Utils.Clients.WebClientByteResult
referrer string
overrideRedirectUrl string
overrideCookies string
accumulateCookies bool
return Task

FollowIfRedirect() protected method

protected FollowIfRedirect ( WebClientStringResult response, string referrer = null, string overrideRedirectUrl = null, string overrideCookies = null, bool accumulateCookies = false ) : Task
response Jackett.Utils.Clients.WebClientStringResult
referrer string
overrideRedirectUrl string
overrideCookies string
accumulateCookies bool
return Task

GetConfigurationForSetup() public method

public GetConfigurationForSetup ( ) : Task
return Task

GetIndexerID() public static method

public static GetIndexerID ( Type type ) : string
type System.Type
return string

LoadFromSavedConfiguration() public method

public LoadFromSavedConfiguration ( JToken jsonConfig ) : void
jsonConfig JToken
return void

LoadLegacyCookieConfig() protected method

protected LoadLegacyCookieConfig ( JToken jsonConfig ) : void
jsonConfig JToken
return void

MapTorznabCapsToTrackers() protected method

protected MapTorznabCapsToTrackers ( TorznabQuery query, bool mapChildrenCatsToParent = false ) : List
query Jackett.Models.TorznabQuery
mapChildrenCatsToParent bool
return List

MapTrackerCatDescToNewznab() protected method

protected MapTrackerCatDescToNewznab ( string input ) : int
input string
return int

MapTrackerCatToNewznab() protected method

protected MapTrackerCatToNewznab ( string input ) : int
input string
return int

OnParseError() protected method

protected OnParseError ( string results, Exception ex ) : void
results string
ex System.Exception
return void

PostDataWithCookies() protected method

protected PostDataWithCookies ( string url, string>.IEnumerable data, string cookieOverride = null, string referer = null, string>.Dictionary headers = null, string rawbody = null, bool emulateBrowser = null ) : Task
url string
data string>.IEnumerable
cookieOverride string
referer string
headers string>.Dictionary
rawbody string
emulateBrowser bool
return Task

PostDataWithCookiesAndRetry() protected method

protected PostDataWithCookiesAndRetry ( string url, string>.IEnumerable data, string cookieOverride = null, string referer = null, string>.Dictionary headers = null, string rawbody = null, bool emulateBrowser = null ) : Task
url string
data string>.IEnumerable
cookieOverride string
referer string
headers string>.Dictionary
rawbody string
emulateBrowser bool
return Task

RequestBytesWithCookies() protected method

protected RequestBytesWithCookies ( string url, string cookieOverride = null ) : Task
url string
cookieOverride string
return Task

RequestBytesWithCookiesAndRetry() protected method

protected RequestBytesWithCookiesAndRetry ( string url, string cookieOverride = null ) : Task
url string
cookieOverride string
return Task

RequestLoginAndFollowRedirect() protected method

protected RequestLoginAndFollowRedirect ( string url, string>.IEnumerable data, string cookies, bool returnCookiesFromFirstCall, string redirectUrlOverride = null, string referer = null, bool accumulateCookies = false ) : Task
url string
data string>.IEnumerable
cookies string
returnCookiesFromFirstCall bool
redirectUrlOverride string
referer string
accumulateCookies bool
return Task

RequestStringWithCookies() protected method

protected RequestStringWithCookies ( string url, string cookieOverride = null, string referer = null, string>.Dictionary headers = null ) : Task
url string
cookieOverride string
referer string
headers string>.Dictionary
return Task

RequestStringWithCookiesAndRetry() protected method

protected RequestStringWithCookiesAndRetry ( string url, string cookieOverride = null, string referer = null, string>.Dictionary headers = null ) : Task
url string
cookieOverride string
referer string
headers string>.Dictionary
return Task

ResetBaseConfig() public method

public ResetBaseConfig ( ) : void
return void

SaveConfig() protected method

protected SaveConfig ( ) : void
return void

UncleanLink() public method

public UncleanLink ( Uri link ) : Uri
link System.Uri
return System.Uri

UpdateCookieHeader() protected method

protected UpdateCookieHeader ( string newCookies, string cookieOverride = null ) : void
newCookies string
cookieOverride string
return void

Property Details

cache protected static property

protected static List cache
return List

cacheTime protected static property

protected static TimeSpan,System cacheTime
return System.TimeSpan

configData protected property

protected ConfigurationData configData
return ConfigurationData

downloadUrlBase protected property

protected string downloadUrlBase
return string

indexerService protected property

protected IIndexerManagerService indexerService
return IIndexerManagerService

logger protected property

protected Logger logger
return Logger

protectionService protected property

protected IProtectionService protectionService
return IProtectionService

webclient protected property

protected IWebClient,Jackett.Utils.Clients webclient
return Jackett.Utils.Clients.IWebClient