2014-03-10 05:18:05 +00:00
|
|
|
# Author: Nic Wolfe <nic@wolfeden.ca>
|
|
|
|
# URL: http://code.google.com/p/sickbeard/
|
|
|
|
#
|
2014-11-12 16:43:14 +00:00
|
|
|
# This file is part of SickGear.
|
2014-03-10 05:18:05 +00:00
|
|
|
#
|
2014-11-12 16:43:14 +00:00
|
|
|
# SickGear is free software: you can redistribute it and/or modify
|
2014-03-10 05:18:05 +00:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
2014-11-12 16:43:14 +00:00
|
|
|
# SickGear is distributed in the hope that it will be useful,
|
2014-03-10 05:18:05 +00:00
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2014-08-29 05:16:25 +00:00
|
|
|
# GNU General Public License for more details.
|
2014-03-10 05:18:05 +00:00
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2014-11-12 16:43:14 +00:00
|
|
|
# along with SickGear. If not, see <http://www.gnu.org/licenses/>.
|
2014-03-10 05:18:05 +00:00
|
|
|
|
2015-09-18 00:06:34 +00:00
|
|
|
from os import sys
|
|
|
|
|
Change validate and improve specific Torrent provider connections, IPT, KAT, SCC, TPB, TB, TD, TT.
Change refactor cache for torrent providers to reduce code.
Change improve search category selection BMTV, FSH, FF, TB.
Change identify more SD release qualities.
Change update SpeedCD, MoreThan, TVChaosuk.
Add torrent provider HD4Free.
Remove torrent provider BitSoup.
Change only create threads for providers needing a recent search instead of for all enabled.
Add 4489 as experimental value to "Recent search frequency" to use provider freqs instead of fixed width for all.
Fix searching nzb season packs.
Change remove some logging cruft.
2016-03-24 18:24:14 +00:00
|
|
|
import os.path
|
2015-09-18 00:06:34 +00:00
|
|
|
import sickbeard
|
|
|
|
|
|
|
|
from . import generic
|
Change validate and improve specific Torrent provider connections, IPT, KAT, SCC, TPB, TB, TD, TT.
Change refactor cache for torrent providers to reduce code.
Change improve search category selection BMTV, FSH, FF, TB.
Change identify more SD release qualities.
Change update SpeedCD, MoreThan, TVChaosuk.
Add torrent provider HD4Free.
Remove torrent provider BitSoup.
Change only create threads for providers needing a recent search instead of for all enabled.
Add 4489 as experimental value to "Recent search frequency" to use provider freqs instead of fixed width for all.
Fix searching nzb season packs.
Change remove some logging cruft.
2016-03-24 18:24:14 +00:00
|
|
|
from sickbeard import logger, encodingKludge as ek
|
2015-09-18 00:06:34 +00:00
|
|
|
# usenet
|
2016-12-31 00:49:20 +00:00
|
|
|
from . import newznab, omgwtfnzbs
|
2015-09-18 00:06:34 +00:00
|
|
|
# torrent
|
2017-12-16 02:52:08 +00:00
|
|
|
from . import alpharatio, beyondhd, bithdtv, bitmetv, blutopia, btn, btscene, dh, ettv, \
|
2017-05-20 09:33:21 +00:00
|
|
|
fano, filelist, funfile, gftracker, grabtheinfo, hd4free, hdbits, hdspace, hdtorrents, \
|
2017-12-16 02:52:08 +00:00
|
|
|
iptorrents, limetorrents, magnetdl, morethan, nebulance, ncore, nyaa, pisexy, potuk, pretome, privatehd, ptf, \
|
2017-08-24 11:36:23 +00:00
|
|
|
rarbg, revtt, scenehd, scenetime, shazbat, skytorrents, speedcd, \
|
2017-10-15 00:19:10 +00:00
|
|
|
thepiratebay, torlock, torrentbytes, torrentday, torrenting, torrentleech, \
|
2018-01-16 01:11:46 +00:00
|
|
|
torrentz2, tvchaosuk, wop, zooqle
|
2015-09-18 00:06:34 +00:00
|
|
|
# anime
|
2017-05-03 23:40:47 +00:00
|
|
|
from . import anizb, tokyotoshokan
|
Change validate and improve specific Torrent provider connections, IPT, KAT, SCC, TPB, TB, TD, TT.
Change refactor cache for torrent providers to reduce code.
Change improve search category selection BMTV, FSH, FF, TB.
Change identify more SD release qualities.
Change update SpeedCD, MoreThan, TVChaosuk.
Add torrent provider HD4Free.
Remove torrent provider BitSoup.
Change only create threads for providers needing a recent search instead of for all enabled.
Add 4489 as experimental value to "Recent search frequency" to use provider freqs instead of fixed width for all.
Fix searching nzb season packs.
Change remove some logging cruft.
2016-03-24 18:24:14 +00:00
|
|
|
# custom
|
|
|
|
try:
|
|
|
|
from . import custom01
|
2017-06-23 22:13:58 +00:00
|
|
|
except (StandardError, Exception):
|
Change validate and improve specific Torrent provider connections, IPT, KAT, SCC, TPB, TB, TD, TT.
Change refactor cache for torrent providers to reduce code.
Change improve search category selection BMTV, FSH, FF, TB.
Change identify more SD release qualities.
Change update SpeedCD, MoreThan, TVChaosuk.
Add torrent provider HD4Free.
Remove torrent provider BitSoup.
Change only create threads for providers needing a recent search instead of for all enabled.
Add 4489 as experimental value to "Recent search frequency" to use provider freqs instead of fixed width for all.
Fix searching nzb season packs.
Change remove some logging cruft.
2016-03-24 18:24:14 +00:00
|
|
|
pass
|
2015-09-18 00:06:34 +00:00
|
|
|
|
|
|
|
__all__ = ['omgwtfnzbs',
|
|
|
|
'alpharatio',
|
2016-05-04 15:22:13 +00:00
|
|
|
'anizb',
|
2015-09-18 00:06:34 +00:00
|
|
|
'beyondhd',
|
2016-06-09 01:23:49 +00:00
|
|
|
'bithdtv',
|
2015-09-18 00:06:34 +00:00
|
|
|
'bitmetv',
|
2017-12-04 13:17:39 +00:00
|
|
|
'blutopia',
|
2014-03-10 05:18:05 +00:00
|
|
|
'btn',
|
2016-08-26 23:36:01 +00:00
|
|
|
'btscene',
|
Change validate and improve specific Torrent provider connections, IPT, KAT, SCC, TPB, TB, TD, TT.
Change refactor cache for torrent providers to reduce code.
Change improve search category selection BMTV, FSH, FF, TB.
Change identify more SD release qualities.
Change update SpeedCD, MoreThan, TVChaosuk.
Add torrent provider HD4Free.
Remove torrent provider BitSoup.
Change only create threads for providers needing a recent search instead of for all enabled.
Add 4489 as experimental value to "Recent search frequency" to use provider freqs instead of fixed width for all.
Fix searching nzb season packs.
Change remove some logging cruft.
2016-03-24 18:24:14 +00:00
|
|
|
'custom01',
|
2016-04-08 20:22:22 +00:00
|
|
|
'dh',
|
2017-12-16 02:52:08 +00:00
|
|
|
'ettv',
|
2016-04-08 16:09:58 +00:00
|
|
|
'fano',
|
2016-05-03 01:44:32 +00:00
|
|
|
'filelist',
|
2015-09-18 00:06:34 +00:00
|
|
|
'funfile',
|
|
|
|
'gftracker',
|
|
|
|
'grabtheinfo',
|
Change validate and improve specific Torrent provider connections, IPT, KAT, SCC, TPB, TB, TD, TT.
Change refactor cache for torrent providers to reduce code.
Change improve search category selection BMTV, FSH, FF, TB.
Change identify more SD release qualities.
Change update SpeedCD, MoreThan, TVChaosuk.
Add torrent provider HD4Free.
Remove torrent provider BitSoup.
Change only create threads for providers needing a recent search instead of for all enabled.
Add 4489 as experimental value to "Recent search frequency" to use provider freqs instead of fixed width for all.
Fix searching nzb season packs.
Change remove some logging cruft.
2016-03-24 18:24:14 +00:00
|
|
|
'hd4free',
|
2014-03-10 05:18:05 +00:00
|
|
|
'hdbits',
|
2015-09-18 00:06:34 +00:00
|
|
|
'hdspace',
|
2016-09-30 22:20:28 +00:00
|
|
|
'hdtorrents',
|
2014-03-10 05:18:05 +00:00
|
|
|
'iptorrents',
|
2016-08-26 23:36:01 +00:00
|
|
|
'limetorrents',
|
2017-06-23 22:13:58 +00:00
|
|
|
'magnetdl',
|
2015-06-21 23:58:27 +00:00
|
|
|
'morethan',
|
2017-05-02 16:08:28 +00:00
|
|
|
'nebulance',
|
2016-08-26 23:36:01 +00:00
|
|
|
'ncore',
|
2017-05-13 20:51:55 +00:00
|
|
|
'nyaa',
|
2015-07-01 17:26:10 +00:00
|
|
|
'pisexy',
|
2017-12-16 02:52:08 +00:00
|
|
|
'potuk',
|
2015-09-14 15:33:51 +00:00
|
|
|
'pretome',
|
2016-06-10 18:29:40 +00:00
|
|
|
'privatehd',
|
2016-03-20 15:10:26 +00:00
|
|
|
'ptf',
|
2015-09-18 00:06:34 +00:00
|
|
|
'rarbg',
|
2016-03-20 04:12:58 +00:00
|
|
|
'revtt',
|
2017-08-24 11:36:23 +00:00
|
|
|
'scenehd',
|
2015-09-18 00:06:34 +00:00
|
|
|
'scenetime',
|
|
|
|
'shazbat',
|
2017-02-18 20:36:42 +00:00
|
|
|
'skytorrents',
|
2015-09-18 00:06:34 +00:00
|
|
|
'speedcd',
|
|
|
|
'thepiratebay',
|
2016-09-23 20:17:25 +00:00
|
|
|
'torlock',
|
2017-10-15 00:19:10 +00:00
|
|
|
'torrentbytes',
|
2015-09-18 00:06:34 +00:00
|
|
|
'torrentday',
|
2015-09-16 23:52:18 +00:00
|
|
|
'torrenting',
|
2015-09-18 00:06:34 +00:00
|
|
|
'torrentleech',
|
2016-09-07 20:24:10 +00:00
|
|
|
'torrentz2',
|
2015-09-18 00:06:34 +00:00
|
|
|
'tvchaosuk',
|
2017-08-24 22:55:02 +00:00
|
|
|
'wop',
|
2016-06-10 00:28:37 +00:00
|
|
|
'zooqle',
|
2015-09-18 00:06:34 +00:00
|
|
|
'tokyotoshokan',
|
|
|
|
]
|
2014-03-10 05:18:05 +00:00
|
|
|
|
|
|
|
|
2014-03-25 05:57:24 +00:00
|
|
|
def sortedProviderList():
|
2014-03-10 05:18:05 +00:00
|
|
|
initialList = sickbeard.providerList + sickbeard.newznabProviderList + sickbeard.torrentRssProviderList
|
2015-07-13 09:39:20 +00:00
|
|
|
providerDict = dict(zip([x.get_id() for x in initialList], initialList))
|
2014-03-10 05:18:05 +00:00
|
|
|
|
|
|
|
newList = []
|
|
|
|
|
|
|
|
# add all modules in the priority list, in order
|
|
|
|
for curModule in sickbeard.PROVIDER_ORDER:
|
|
|
|
if curModule in providerDict:
|
|
|
|
newList.append(providerDict[curModule])
|
|
|
|
|
|
|
|
# add any modules that are missing from that list
|
|
|
|
for curModule in providerDict:
|
|
|
|
if providerDict[curModule] not in newList:
|
|
|
|
newList.append(providerDict[curModule])
|
|
|
|
|
|
|
|
return newList
|
|
|
|
|
2014-08-29 05:16:25 +00:00
|
|
|
|
2014-03-25 05:57:24 +00:00
|
|
|
def makeProviderList():
|
2017-10-11 22:12:30 +00:00
|
|
|
providers = [x.provider for x in [getProviderModule(y) for y in __all__] if x]
|
|
|
|
import browser_ua, zlib
|
|
|
|
headers = [1449593765]
|
|
|
|
for p in providers:
|
|
|
|
if abs(zlib.crc32(p.name)) + 40000400 in headers:
|
|
|
|
p.headers.update({'User-Agent': browser_ua.get_ua()})
|
|
|
|
return providers
|
2014-03-10 05:18:05 +00:00
|
|
|
|
|
|
|
|
2014-03-25 05:57:24 +00:00
|
|
|
def getNewznabProviderList(data):
|
2014-03-10 05:18:05 +00:00
|
|
|
defaultList = [makeNewznabProvider(x) for x in getDefaultNewznabProviders().split('!!!')]
|
|
|
|
providerList = filter(lambda x: x, [makeNewznabProvider(x) for x in data.split('!!!')])
|
|
|
|
|
2014-05-20 20:51:54 +00:00
|
|
|
seen_values = set()
|
|
|
|
providerListDeduped = []
|
|
|
|
for d in providerList:
|
|
|
|
value = d.name
|
|
|
|
if value not in seen_values:
|
|
|
|
providerListDeduped.append(d)
|
|
|
|
seen_values.add(value)
|
|
|
|
|
|
|
|
providerList = providerListDeduped
|
2014-03-10 05:18:05 +00:00
|
|
|
providerDict = dict(zip([x.name for x in providerList], providerList))
|
|
|
|
|
|
|
|
for curDefault in defaultList:
|
|
|
|
if not curDefault:
|
|
|
|
continue
|
|
|
|
|
|
|
|
if curDefault.name not in providerDict:
|
|
|
|
curDefault.default = True
|
|
|
|
providerList.append(curDefault)
|
|
|
|
else:
|
|
|
|
providerDict[curDefault.name].default = True
|
|
|
|
providerDict[curDefault.name].name = curDefault.name
|
|
|
|
providerDict[curDefault.name].url = curDefault.url
|
|
|
|
providerDict[curDefault.name].needs_auth = curDefault.needs_auth
|
2014-05-17 05:23:11 +00:00
|
|
|
providerDict[curDefault.name].search_mode = curDefault.search_mode
|
|
|
|
providerDict[curDefault.name].search_fallback = curDefault.search_fallback
|
2014-12-22 18:30:53 +00:00
|
|
|
providerDict[curDefault.name].enable_recentsearch = curDefault.enable_recentsearch
|
2014-08-29 05:16:25 +00:00
|
|
|
providerDict[curDefault.name].enable_backlog = curDefault.enable_backlog
|
2017-01-01 20:24:41 +00:00
|
|
|
providerDict[curDefault.name].enable_scheduled_backlog = curDefault.enable_scheduled_backlog
|
2014-03-25 05:57:24 +00:00
|
|
|
|
2014-03-10 05:18:05 +00:00
|
|
|
return filter(lambda x: x, providerList)
|
|
|
|
|
|
|
|
|
|
|
|
def makeNewznabProvider(configString):
|
|
|
|
if not configString:
|
|
|
|
return None
|
|
|
|
|
2014-05-17 05:23:11 +00:00
|
|
|
search_mode = 'eponly'
|
|
|
|
search_fallback = 0
|
2014-12-22 18:30:53 +00:00
|
|
|
enable_recentsearch = 0
|
2014-08-29 05:16:25 +00:00
|
|
|
enable_backlog = 0
|
2017-01-01 20:24:41 +00:00
|
|
|
enable_scheduled_backlog = 1
|
2014-05-17 05:23:11 +00:00
|
|
|
|
2014-03-10 05:18:05 +00:00
|
|
|
try:
|
2014-08-29 05:52:02 +00:00
|
|
|
values = configString.split('|')
|
2017-01-01 20:24:41 +00:00
|
|
|
if len(values) == 10:
|
|
|
|
name, url, key, cat_ids, enabled, search_mode, search_fallback, enable_recentsearch, enable_backlog, \
|
|
|
|
enable_scheduled_backlog = values
|
|
|
|
elif len(values) == 9:
|
2015-06-19 16:47:52 +00:00
|
|
|
name, url, key, cat_ids, enabled, search_mode, search_fallback, enable_recentsearch, enable_backlog = values
|
2014-08-29 05:52:02 +00:00
|
|
|
else:
|
|
|
|
name = values[0]
|
|
|
|
url = values[1]
|
|
|
|
key = values[2]
|
2015-06-19 16:47:52 +00:00
|
|
|
cat_ids = values[3]
|
2014-08-29 05:52:02 +00:00
|
|
|
enabled = values[4]
|
2014-08-29 05:30:30 +00:00
|
|
|
except ValueError:
|
2014-08-29 05:52:02 +00:00
|
|
|
logger.log(u"Skipping Newznab provider string: '" + configString + "', incorrect format", logger.ERROR)
|
|
|
|
return None
|
2014-03-10 05:18:05 +00:00
|
|
|
|
|
|
|
newznab = sys.modules['sickbeard.providers.newznab']
|
|
|
|
|
2015-06-19 16:47:52 +00:00
|
|
|
newProvider = newznab.NewznabProvider(name, url, key=key, cat_ids=cat_ids, search_mode=search_mode,
|
2014-12-22 18:30:53 +00:00
|
|
|
search_fallback=search_fallback, enable_recentsearch=enable_recentsearch,
|
2017-01-01 20:24:41 +00:00
|
|
|
enable_backlog=enable_backlog, enable_scheduled_backlog=enable_scheduled_backlog)
|
2014-03-10 05:18:05 +00:00
|
|
|
newProvider.enabled = enabled == '1'
|
|
|
|
|
|
|
|
return newProvider
|
|
|
|
|
2014-03-25 05:57:24 +00:00
|
|
|
|
2014-03-10 05:18:05 +00:00
|
|
|
def getTorrentRssProviderList(data):
|
|
|
|
providerList = filter(lambda x: x, [makeTorrentRssProvider(x) for x in data.split('!!!')])
|
2014-05-21 03:22:48 +00:00
|
|
|
|
|
|
|
seen_values = set()
|
|
|
|
providerListDeduped = []
|
|
|
|
for d in providerList:
|
|
|
|
value = d.name
|
|
|
|
if value not in seen_values:
|
|
|
|
providerListDeduped.append(d)
|
|
|
|
seen_values.add(value)
|
|
|
|
|
2014-03-10 05:18:05 +00:00
|
|
|
return filter(lambda x: x, providerList)
|
|
|
|
|
|
|
|
|
2014-03-25 05:57:24 +00:00
|
|
|
def makeTorrentRssProvider(configString):
|
2014-03-10 05:18:05 +00:00
|
|
|
if not configString:
|
|
|
|
return None
|
|
|
|
|
2014-05-25 07:28:13 +00:00
|
|
|
cookies = None
|
2014-05-21 03:22:48 +00:00
|
|
|
search_mode = 'eponly'
|
|
|
|
search_fallback = 0
|
2014-12-22 18:30:53 +00:00
|
|
|
enable_recentsearch = 0
|
2014-08-29 05:16:25 +00:00
|
|
|
enable_backlog = 0
|
2017-01-01 20:24:41 +00:00
|
|
|
enable_scheduled_backlog = 1
|
2014-05-21 03:22:48 +00:00
|
|
|
|
|
|
|
try:
|
2014-08-29 05:52:02 +00:00
|
|
|
values = configString.split('|')
|
2017-01-01 20:24:41 +00:00
|
|
|
if len(values) == 9:
|
|
|
|
name, url, cookies, enabled, search_mode, search_fallback, enable_recentsearch, enable_backlog, \
|
|
|
|
enable_scheduled_backlog = values
|
|
|
|
elif len(values) == 8:
|
2014-12-22 18:30:53 +00:00
|
|
|
name, url, cookies, enabled, search_mode, search_fallback, enable_recentsearch, enable_backlog = values
|
2014-08-29 05:52:02 +00:00
|
|
|
else:
|
|
|
|
name = values[0]
|
|
|
|
url = values[1]
|
|
|
|
enabled = values[3]
|
2014-05-21 03:22:48 +00:00
|
|
|
except ValueError:
|
2014-08-29 05:52:02 +00:00
|
|
|
logger.log(u"Skipping RSS Torrent provider string: '" + configString + "', incorrect format",
|
|
|
|
logger.ERROR)
|
|
|
|
return None
|
2014-03-10 05:18:05 +00:00
|
|
|
|
2014-06-11 08:34:28 +00:00
|
|
|
try:
|
|
|
|
torrentRss = sys.modules['sickbeard.providers.rsstorrent']
|
|
|
|
except:
|
|
|
|
return
|
2014-03-10 05:18:05 +00:00
|
|
|
|
2014-12-22 18:30:53 +00:00
|
|
|
newProvider = torrentRss.TorrentRssProvider(name, url, cookies, search_mode, search_fallback, enable_recentsearch,
|
2017-01-01 20:24:41 +00:00
|
|
|
enable_backlog, enable_scheduled_backlog)
|
2014-03-10 05:18:05 +00:00
|
|
|
newProvider.enabled = enabled == '1'
|
|
|
|
|
|
|
|
return newProvider
|
|
|
|
|
2014-03-25 05:57:24 +00:00
|
|
|
|
2014-03-10 05:18:05 +00:00
|
|
|
def getDefaultNewznabProviders():
|
Change validate and improve specific Torrent provider connections, IPT, KAT, SCC, TPB, TB, TD, TT.
Change refactor cache for torrent providers to reduce code.
Change improve search category selection BMTV, FSH, FF, TB.
Change identify more SD release qualities.
Change update SpeedCD, MoreThan, TVChaosuk.
Add torrent provider HD4Free.
Remove torrent provider BitSoup.
Change only create threads for providers needing a recent search instead of for all enabled.
Add 4489 as experimental value to "Recent search frequency" to use provider freqs instead of fixed width for all.
Fix searching nzb season packs.
Change remove some logging cruft.
2016-03-24 18:24:14 +00:00
|
|
|
return '!!!'.join(['Sick Beard Index|http://lolo.sickbeard.com/|0|5030,5040|0|eponly|0|0|0',
|
|
|
|
'NZBgeek|https://api.nzbgeek.info/||5030,5040|0|eponly|0|0|0',
|
|
|
|
'NZBs.org|https://nzbs.org/||5030,5040|0|eponly|0|0|0',
|
2016-08-26 23:36:01 +00:00
|
|
|
])
|
2014-03-10 05:18:05 +00:00
|
|
|
|
2014-03-25 05:57:24 +00:00
|
|
|
|
2014-03-10 05:18:05 +00:00
|
|
|
def getProviderModule(name):
|
Change validate and improve specific Torrent provider connections, IPT, KAT, SCC, TPB, TB, TD, TT.
Change refactor cache for torrent providers to reduce code.
Change improve search category selection BMTV, FSH, FF, TB.
Change identify more SD release qualities.
Change update SpeedCD, MoreThan, TVChaosuk.
Add torrent provider HD4Free.
Remove torrent provider BitSoup.
Change only create threads for providers needing a recent search instead of for all enabled.
Add 4489 as experimental value to "Recent search frequency" to use provider freqs instead of fixed width for all.
Fix searching nzb season packs.
Change remove some logging cruft.
2016-03-24 18:24:14 +00:00
|
|
|
prefix, cprov, name = 'sickbeard.providers.', 'motsuc'[::-1], name.lower()
|
2014-03-25 05:57:24 +00:00
|
|
|
if name in __all__ and prefix + name in sys.modules:
|
|
|
|
return sys.modules[prefix + name]
|
Change validate and improve specific Torrent provider connections, IPT, KAT, SCC, TPB, TB, TD, TT.
Change refactor cache for torrent providers to reduce code.
Change improve search category selection BMTV, FSH, FF, TB.
Change identify more SD release qualities.
Change update SpeedCD, MoreThan, TVChaosuk.
Add torrent provider HD4Free.
Remove torrent provider BitSoup.
Change only create threads for providers needing a recent search instead of for all enabled.
Add 4489 as experimental value to "Recent search frequency" to use provider freqs instead of fixed width for all.
Fix searching nzb season packs.
Change remove some logging cruft.
2016-03-24 18:24:14 +00:00
|
|
|
elif cprov in name:
|
|
|
|
return None
|
|
|
|
raise Exception('Can\'t find %s%s in providers' % (prefix, name))
|
2014-03-10 05:18:05 +00:00
|
|
|
|
|
|
|
|
2014-03-25 05:57:24 +00:00
|
|
|
def getProviderClass(id):
|
|
|
|
providerMatch = [x for x in
|
|
|
|
sickbeard.providerList + sickbeard.newznabProviderList + sickbeard.torrentRssProviderList if
|
2015-07-13 09:39:20 +00:00
|
|
|
x.get_id() == id]
|
2014-03-10 05:18:05 +00:00
|
|
|
|
|
|
|
if len(providerMatch) != 1:
|
|
|
|
return None
|
|
|
|
else:
|
|
|
|
return providerMatch[0]
|