本文整理汇总了Python中sickbeard.providers.makeProviderList函数的典型用法代码示例。如果您正苦于以下问题:Python makeProviderList函数的具体用法?Python makeProviderList怎么用?Python makeProviderList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了makeProviderList函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_sni_urls
def test_sni_urls(self):
"""
Test SNI urls
:return:
"""
print ""
# Just checking all providers - we should make this error on non-existent urls.
for provider in [
provider
for provider in providers.makeProviderList()
if provider.name not in self.self_signed_cert_providers
]:
print "Checking %s" % provider.name
try:
requests.head(provider.url, verify=certifi.old_where(), timeout=10)
except requests.exceptions.Timeout:
pass
except requests.exceptions.SSLError as error:
if u"SSL3_GET_SERVER_CERTIFICATE" not in ex(error):
print "SSLError on %s: %s" % (provider.name, ex(error.message))
raise
else:
print "Cannot verify certificate for %s" % provider.name
except Exception: # pylint: disable=broad-except
pass
开发者ID:TagForce,项目名称:SickRage,代码行数:25,代码来源:ssl_sni_tests.py
示例2: setSickbeardGlobals
def setSickbeardGlobals():
sickbeard.SYS_ENCODING = 'UTF-8'
sickbeard.showList = []
sickbeard.QUALITY_DEFAULT = 4 #hdtv
sickbeard.FLATTEN_FOLDERS_DEFAULT = 0
sickbeard.NAMING_PATTERN = ''
sickbeard.NAMING_ABD_PATTERN = ''
sickbeard.NAMING_MULTI_EP = 1
sickbeard.NAMING_SHOW_NAME = 1
sickbeard.NAMING_EP_NAME = 1
sickbeard.NAMING_EP_TYPE = 0
sickbeard.NAMING_MULTI_EP_TYPE = 1
sickbeard.NAMING_SEP_TYPE = 0
sickbeard.NAMING_USE_PERIODS = 0
sickbeard.NAMING_QUALITY = 0
sickbeard.NAMING_DATES = 1
sickbeard.PROVIDER_ORDER = ["sick_beard_index"]
sickbeard.newznabProviderList = providers.getNewznabProviderList("Sick Beard Index|http://momo.sickbeard.com/||1!!!NZBs.org|http://beta.nzbs.org/||0")
sickbeard.providerList = providers.makeProviderList()
sickbeard.PROG_DIR = os.path.abspath('..')
sickbeard.DATA_DIR = sickbeard.PROG_DIR
sickbeard.LOG_DIR = os.path.join(TESTDIR, 'Logs')
sickbeard.PROVIDER_ORDER = ["sick_beard_index"]
sickbeard.newznabProviderList = providers.getNewznabProviderList("Sick Beard Index|http://momo.sickbeard.com/||1!!!NZBs.org|http://nzbs.org/||0")
sickbeard.providerList = providers.makeProviderList()
sickbeard.PROG_DIR = os.path.abspath('..')
sickbeard.DATA_DIR = sickbeard.PROG_DIR
sickbeard.LOG_DIR = os.path.join(TESTDIR, 'Logs')
createTestLogFolder()
开发者ID:Pakoach,项目名称:Sick-Beard-Animes,代码行数:36,代码来源:test_lib.py
示例3: test_SNI_URLS
def test_SNI_URLS(self):
print ''
#Just checking all providers - we should make this error on non-existent urls.
for provider in [provider for provider in providers.makeProviderList() if provider.name not in self.self_signed_cert_providers]:
print 'Checking %s' % provider.name
try:
requests.head(provider.url, verify=certifi.where(), timeout=5)
except requests.exceptions.Timeout:
pass
except requests.exceptions.SSLError as error:
if u'SSL3_GET_SERVER_CERTIFICATE' not in ex(error):
print 'SSLError on %s: %s' % (provider.name, ex(error.message))
raise
else:
print 'Cannot verify certificate for %s' % provider.name
except Exception:
pass
开发者ID:BreizhCat,项目名称:SickRage,代码行数:17,代码来源:ssl_sni_tests.py
示例4: setSickbeardGlobals
def setSickbeardGlobals():
sickbeard.SYS_ENCODING = 'UTF-8'
sickbeard.showList = []
sickbeard.QUALITY_DEFAULT = 4
sickbeard.SEASON_FOLDERS_DEFAULT = 1
sickbeard.SEASON_FOLDERS_FORMAT = 'Season %02d'
sickbeard.RENAME_EPISODES = True
sickbeard.NAMING_SHOW_NAME = 1
sickbeard.NAMING_EP_NAME = 1
sickbeard.NAMING_EP_TYPE = 0
sickbeard.NAMING_MULTI_EP_TYPE = 1
sickbeard.NAMING_SEP_TYPE = 0
sickbeard.NAMING_USE_PERIODS = 0
sickbeard.NAMING_QUALITY = 0
sickbeard.NAMING_DATES = 1
sickbeard.PROVIDER_ORDER = ["sick_beard_index"]
sickbeard.newznabProviderList = providers.getNewznabProviderList("Sick Beard Index|http://momo.sickbeard.com/||1!!!NZBs.org|http://beta.nzbs.org/||0")
sickbeard.providerList = providers.makeProviderList()
sickbeard.PROG_DIR = os.path.abspath('..')
sickbeard.DATA_DIR = sickbeard.PROG_DIR
sickbeard.LOG_DIR = os.path.join(TESTDIR, 'Logs')
开发者ID:stephanehenry27,项目名称:Sickbeard-anime,代码行数:24,代码来源:test_lib.py
示例5: ConfigObj
#=================
sickbeard.SYS_ENCODING = 'UTF-8'
sickbeard.showList = []
sickbeard.QUALITY_DEFAULT = 4 # hdtv
sickbeard.FLATTEN_FOLDERS_DEFAULT = 0
sickbeard.NAMING_PATTERN = ''
sickbeard.NAMING_ABD_PATTERN = ''
sickbeard.NAMING_SPORTS_PATTERN = ''
sickbeard.NAMING_MULTI_EP = 1
sickbeard.PROVIDER_ORDER = ["sick_beard_index"]
sickbeard.newznabProviderList = providers.getNewznabProviderList("'Sick Beard Index|http://lolo.sickbeard.com/|0|5030,5040|0|eponly|0|0|0!!!NZBs.org|https://nzbs.org/||5030,5040,5060,5070,5090|0|eponly|0|0|0!!!Usenet-Crawler|https://www.usenet-crawler.com/||5030,5040,5060|0|eponly|0|0|0'")
sickbeard.providerList = providers.makeProviderList()
sickbeard.PROG_DIR = os.path.abspath(os.path.join(TESTDIR, '..'))
sickbeard.DATA_DIR = TESTDIR
sickbeard.CONFIG_FILE = os.path.join(sickbeard.DATA_DIR, "config.ini")
sickbeard.CFG = ConfigObj(sickbeard.CONFIG_FILE)
sickbeard.BRANCG = sickbeard.config.check_setting_str(sickbeard.CFG, 'General', 'branch', '')
sickbeard.CUR_COMMIT_HASH = sickbeard.config.check_setting_str(sickbeard.CFG, 'General', 'cur_commit_hash', '')
sickbeard.GIT_USERNAME = sickbeard.config.check_setting_str(sickbeard.CFG, 'General', 'git_username', '')
sickbeard.GIT_PASSWORD = sickbeard.config.check_setting_str(sickbeard.CFG, 'General', 'git_password', '', censor_log=True)
sickbeard.LOG_DIR = os.path.join(TESTDIR, 'Logs')
sickbeard.logger.logFile = os.path.join(sickbeard.LOG_DIR, 'test_sickbeard.log')
createTestLogFolder()
开发者ID:logo000,项目名称:SickRage,代码行数:30,代码来源:test_lib.py
示例6: initialize
#.........这里部分代码省略.........
new_metadata_class = old_metadata_class(METADATA_SHOW,
METADATA_EPISODE,
ART_POSTER,
ART_FANART,
ART_THUMBNAILS,
ART_SEASON_THUMBNAILS)
metadata_provider_dict[new_metadata_class.name] = new_metadata_class
# this is the normal codepath for metadata config
else:
METADATA_XBMC = check_setting_str(CFG, 'General', 'metadata_xbmc', '0|0|0|0|0|0')
METADATA_MEDIABROWSER = check_setting_str(CFG, 'General', 'metadata_mediabrowser', '0|0|0|0|0|0')
METADATA_PS3 = check_setting_str(CFG, 'General', 'metadata_ps3', '0|0|0|0|0|0')
METADATA_WDTV = check_setting_str(CFG, 'General', 'metadata_wdtv', '0|0|0|0|0|0')
METADATA_TIVO = check_setting_str(CFG, 'General', 'metadata_tivo', '0|0|0|0|0|0')
for cur_metadata_tuple in [(METADATA_XBMC, metadata.xbmc),
(METADATA_MEDIABROWSER, metadata.mediabrowser),
(METADATA_PS3, metadata.ps3),
(METADATA_WDTV, metadata.wdtv),
(METADATA_TIVO, metadata.tivo),
]:
(cur_metadata_config, cur_metadata_class) = cur_metadata_tuple
tmp_provider = cur_metadata_class.metadata_class()
tmp_provider.set_config(cur_metadata_config)
metadata_provider_dict[tmp_provider.name] = tmp_provider
COMING_EPS_LAYOUT = check_setting_str(CFG, 'GUI', 'coming_eps_layout', 'banner')
COMING_EPS_DISPLAY_PAUSED = bool(check_setting_int(CFG, 'GUI', 'coming_eps_display_paused', 0))
COMING_EPS_SORT = check_setting_str(CFG, 'GUI', 'coming_eps_sort', 'date')
newznabData = check_setting_str(CFG, 'Newznab', 'newznab_data', '')
newznabProviderList = providers.getNewznabProviderList(newznabData)
providerList = providers.makeProviderList()
logger.sb_log_instance.initLogging(consoleLogging=consoleLogging)
# initialize the main SB database
db.upgradeDatabase(db.DBConnection(), mainDB.InitialSchema)
# initialize the cache database
db.upgradeDatabase(db.DBConnection("cache.db"), cache_db.InitialSchema)
# fix up any db problems
db.sanityCheckDatabase(db.DBConnection(), mainDB.MainSanityCheck)
currentSearchScheduler = scheduler.Scheduler(searchCurrent.CurrentSearcher(),
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY),
threadName="SEARCH",
runImmediately=True)
# the interval for this is stored inside the ShowUpdater class
showUpdaterInstance = showUpdater.ShowUpdater()
showUpdateScheduler = scheduler.Scheduler(showUpdaterInstance,
cycleTime=showUpdaterInstance.updateInterval,
threadName="SHOWUPDATER",
runImmediately=False)
versionCheckScheduler = scheduler.Scheduler(versionChecker.CheckVersion(),
cycleTime=datetime.timedelta(hours=12),
threadName="CHECKVERSION",
runImmediately=True)
showQueueScheduler = scheduler.Scheduler(show_queue.ShowQueue(),
cycleTime=datetime.timedelta(seconds=3),
threadName="SHOWQUEUE",
silent=True)
searchQueueScheduler = scheduler.Scheduler(search_queue.SearchQueue(),
cycleTime=datetime.timedelta(seconds=3),
threadName="SEARCHQUEUE",
silent=True)
properFinderInstance = properFinder.ProperFinder()
properFinderScheduler = scheduler.Scheduler(properFinderInstance,
cycleTime=properFinderInstance.updateInterval,
threadName="FINDPROPERS",
runImmediately=False)
autoPostProcesserScheduler = scheduler.Scheduler(autoPostProcesser.PostProcesser(),
cycleTime=datetime.timedelta(minutes=10),
threadName="POSTPROCESSER",
runImmediately=True)
backlogSearchScheduler = searchBacklog.BacklogSearchScheduler(searchBacklog.BacklogSearcher(),
cycleTime=datetime.timedelta(minutes=get_backlog_cycle_time()),
threadName="BACKLOG",
runImmediately=True)
backlogSearchScheduler.action.cycleTime = BACKLOG_SEARCH_FREQUENCY
showList = []
loadingShowList = {}
__INITIALIZED__ = True
return True
开发者ID:wezman,项目名称:Sick-Beard,代码行数:101,代码来源:__init__.py
示例7: initialize
#.........这里部分代码省略.........
USE_NMA = bool(check_setting_int(CFG, 'NMA', 'use_nma', 0))
NMA_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'NMA', 'nma_notify_onsnatch', 0))
NMA_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'NMA', 'nma_notify_ondownload', 0))
NMA_API = check_setting_str(CFG, 'NMA', 'nma_api', '')
NMA_PRIORITY = check_setting_str(CFG, 'NMA', 'nma_priority', "0")
if not os.path.isfile(CONFIG_FILE):
logger.log(u"Unable to find '" + CONFIG_FILE + "', all settings will be default!", logger.DEBUG)
save_config()
# start up all the threads
logger.sb_log_instance.initLogging(consoleLogging=consoleLogging)
# initialize the main SB database
db.upgradeDatabase(db.DBConnection(), mainDB.InitialSchema)
# initialize the cache database
db.upgradeDatabase(db.DBConnection("cache.db"), cache_db.InitialSchema)
# fix up any db problems
db.sanityCheckDatabase(db.DBConnection(), mainDB.MainSanityCheck)
# migrate the config if it needs it
migrator = ConfigMigrator(CFG)
migrator.migrate_config()
# initialize metadata_providers
metadata_provider_dict = metadata.get_metadata_generator_dict()
for cur_metadata_tuple in [(METADATA_XBMC, metadata.xbmc),
(METADATA_XBMC_12PLUS, metadata.xbmc_12plus),
(METADATA_MEDIABROWSER, metadata.mediabrowser),
(METADATA_PS3, metadata.ps3),
(METADATA_WDTV, metadata.wdtv),
(METADATA_TIVO, metadata.tivo),
(METADATA_MEDE8ER, metadata.mede8er)
]:
(cur_metadata_config, cur_metadata_class) = cur_metadata_tuple
tmp_provider = cur_metadata_class.metadata_class()
tmp_provider.set_config(cur_metadata_config)
metadata_provider_dict[tmp_provider.name] = tmp_provider
# initialize newznab providers
newznabProviderList = providers.getNewznabProviderList(NEWZNAB_DATA)
providerList = providers.makeProviderList()
# initialize schedulars
currentSearchScheduler = scheduler.Scheduler(searchCurrent.CurrentSearcher(),
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY),
threadName="SEARCH",
runImmediately=True)
# the interval for this is stored inside the ShowUpdater class
showUpdaterInstance = showUpdater.ShowUpdater()
showUpdateScheduler = scheduler.Scheduler(showUpdaterInstance,
cycleTime=showUpdaterInstance.updateInterval,
threadName="SHOWUPDATER",
runImmediately=False)
versionCheckScheduler = scheduler.Scheduler(versionChecker.CheckVersion(),
cycleTime=datetime.timedelta(hours=12),
threadName="CHECKVERSION",
runImmediately=True)
showQueueScheduler = scheduler.Scheduler(show_queue.ShowQueue(),
cycleTime=datetime.timedelta(seconds=3),
threadName="SHOWQUEUE",
silent=True)
searchQueueScheduler = scheduler.Scheduler(search_queue.SearchQueue(),
cycleTime=datetime.timedelta(seconds=3),
threadName="SEARCHQUEUE",
silent=True)
properFinderInstance = properFinder.ProperFinder()
properFinderScheduler = scheduler.Scheduler(properFinderInstance,
cycleTime=properFinderInstance.updateInterval,
threadName="FINDPROPERS",
runImmediately=False)
if not DOWNLOAD_PROPERS:
properFinderScheduler.silent = True
autoPostProcesserScheduler = scheduler.Scheduler(autoPostProcesser.PostProcesser(),
cycleTime=datetime.timedelta(minutes=10),
threadName="POSTPROCESSER",
runImmediately=True)
if not PROCESS_AUTOMATICALLY:
autoPostProcesserScheduler.silent = True
backlogSearchScheduler = searchBacklog.BacklogSearchScheduler(searchBacklog.BacklogSearcher(),
cycleTime=datetime.timedelta(minutes=get_backlog_cycle_time()),
threadName="BACKLOG",
runImmediately=True)
backlogSearchScheduler.action.cycleTime = BACKLOG_SEARCH_FREQUENCY
showList = []
loadingShowList = {}
__INITIALIZED__ = True
return True
开发者ID:Larusso,项目名称:Sick-Beard,代码行数:101,代码来源:__init__.py
示例8: initialize
#.........这里部分代码省略.........
KEEP_PROCESSED_DIR = check_setting_int(CFG, 'General', 'keep_processed_dir', 1)
TVBINZ = bool(check_setting_int(CFG, 'TVBinz', 'tvbinz', 0))
TVBINZ_UID = check_setting_str(CFG, 'TVBinz', 'tvbinz_uid', '')
TVBINZ_SABUID = check_setting_str(CFG, 'TVBinz', 'tvbinz_sabuid', '')
TVBINZ_HASH = check_setting_str(CFG, 'TVBinz', 'tvbinz_hash', '')
TVBINZ_AUTH = check_setting_str(CFG, 'TVBinz', 'tvbinz_auth', '')
NZBS = bool(check_setting_int(CFG, 'NZBs', 'nzbs', 0))
NZBS_UID = check_setting_str(CFG, 'NZBs', 'nzbs_uid', '')
NZBS_HASH = check_setting_str(CFG, 'NZBs', 'nzbs_hash', '')
NZBSRUS = bool(check_setting_int(CFG, 'NZBsRUS', 'nzbsrus', 0))
NZBSRUS_UID = check_setting_str(CFG, 'NZBsRUS', 'nzbsrus_uid', '')
NZBSRUS_HASH = check_setting_str(CFG, 'NZBsRUS', 'nzbsrus_hash', '')
NZBMATRIX = bool(check_setting_int(CFG, 'NZBMatrix', 'nzbmatrix', 0))
NZBMATRIX_USERNAME = check_setting_str(CFG, 'NZBMatrix', 'nzbmatrix_username', '')
NZBMATRIX_APIKEY = check_setting_str(CFG, 'NZBMatrix', 'nzbmatrix_apikey', '')
BINREQ = bool(check_setting_int(CFG, 'Bin-Req', 'binreq', 1))
SAB_USERNAME = check_setting_str(CFG, 'SABnzbd', 'sab_username', '')
SAB_PASSWORD = check_setting_str(CFG, 'SABnzbd', 'sab_password', '')
SAB_APIKEY = check_setting_str(CFG, 'SABnzbd', 'sab_apikey', '')
SAB_CATEGORY = check_setting_str(CFG, 'SABnzbd', 'sab_category', 'tv')
SAB_HOST = check_setting_str(CFG, 'SABnzbd', 'sab_host', '')
XBMC_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'XBMC', 'xbmc_notify_onsnatch', 0))
XBMC_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'XBMC', 'xbmc_notify_ondownload', 0))
XBMC_UPDATE_LIBRARY = bool(check_setting_int(CFG, 'XBMC', 'xbmc_update_library', 0))
XBMC_UPDATE_FULL = bool(check_setting_int(CFG, 'XBMC', 'xbmc_update_full', 0))
XBMC_HOST = check_setting_str(CFG, 'XBMC', 'xbmc_host', '')
XBMC_USERNAME = check_setting_str(CFG, 'XBMC', 'xbmc_username', '')
XBMC_PASSWORD = check_setting_str(CFG, 'XBMC', 'xbmc_password', '')
USE_GROWL = bool(check_setting_int(CFG, 'Growl', 'use_growl', 0))
GROWL_HOST = check_setting_str(CFG, 'Growl', 'growl_host', '')
GROWL_PASSWORD = check_setting_str(CFG, 'Growl', 'growl_password', '')
EXTRA_SCRIPTS = [x for x in check_setting_str(CFG, 'General', 'extra_scripts', '').split('|') if x]
newznabData = check_setting_str(CFG, 'Newznab', 'newznab_data', '')
newznabProviderList = providers.getNewznabProviderList(newznabData)
providerList = providers.makeProviderList()
logger.initLogging(consoleLogging=consoleLogging)
# initialize the main SB database
db.upgradeDatabase(db.DBConnection(), mainDB.InitialSchema)
currentSearchScheduler = scheduler.Scheduler(searchCurrent.CurrentSearcher(),
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY),
threadName="SEARCH",
runImmediately=True)
backlogSearchScheduler = searchBacklog.BacklogSearchScheduler(searchBacklog.BacklogSearcher(),
cycleTime=datetime.timedelta(hours=1),
threadName="BACKLOG",
runImmediately=False)
backlogSearchScheduler.action.cycleTime = BACKLOG_SEARCH_FREQUENCY
# the interval for this is stored inside the ShowUpdater class
showUpdaterInstance = showUpdater.ShowUpdater()
showUpdateScheduler = scheduler.Scheduler(showUpdaterInstance,
cycleTime=showUpdaterInstance.updateInterval,
threadName="SHOWUPDATER",
runImmediately=False)
versionCheckScheduler = scheduler.Scheduler(versionChecker.CheckVersion(),
cycleTime=datetime.timedelta(hours=12),
threadName="CHECKVERSION",
runImmediately=True)
showQueueScheduler = scheduler.Scheduler(queue.ShowQueue(),
cycleTime=datetime.timedelta(seconds=3),
threadName="SHOWQUEUE",
silent=True)
properFinderInstance = properFinder.ProperFinder()
properFinderScheduler = scheduler.Scheduler(properFinderInstance,
cycleTime=properFinderInstance.updateInterval,
threadName="FINDPROPERS",
runImmediately=False)
autoPostProcesserScheduler = scheduler.Scheduler(autoPostProcesser.PostProcesser(),
cycleTime=datetime.timedelta(minutes=10),
threadName="POSTPROCESSER",
runImmediately=True)
showList = []
loadingShowList = {}
airingList = []
comingList = []
__INITIALIZED__ = True
return True
开发者ID:Orbi,项目名称:Sick-Beard,代码行数:101,代码来源:__init__.py
示例9: initialize
#.........这里部分代码省略.........
METADATA_SHOW, METADATA_EPISODE, ART_POSTER, ART_FANART, ART_THUMBNAILS, ART_SEASON_THUMBNAILS
)
metadata_provider_dict[new_metadata_class.name] = new_metadata_class
# this is the normal codepath for metadata config
else:
METADATA_XBMC = check_setting_str(CFG, "General", "metadata_xbmc", "0|0|0|0|0|0")
METADATA_MEDIABROWSER = check_setting_str(CFG, "General", "metadata_mediabrowser", "0|0|0|0|0|0")
METADATA_PS3 = check_setting_str(CFG, "General", "metadata_ps3", "0|0|0|0|0|0")
METADATA_WDTV = check_setting_str(CFG, "General", "metadata_wdtv", "0|0|0|0|0|0")
METADATA_TIVO = check_setting_str(CFG, "General", "metadata_tivo", "0|0|0|0|0|0")
for cur_metadata_tuple in [
(METADATA_XBMC, metadata.xbmc),
(METADATA_MEDIABROWSER, metadata.mediabrowser),
(METADATA_PS3, metadata.ps3),
(METADATA_WDTV, metadata.wdtv),
(METADATA_TIVO, metadata.tivo),
]:
(cur_metadata_config, cur_metadata_class) = cur_metadata_tuple
tmp_provider = cur_metadata_class.metadata_class()
tmp_provider.set_config(cur_metadata_config)
metadata_provider_dict[tmp_provider.name] = tmp_provider
COMING_EPS_LAYOUT = check_setting_str(CFG, "GUI", "coming_eps_layout", "banner")
COMING_EPS_DISPLAY_PAUSED = bool(check_setting_int(CFG, "GUI", "coming_eps_display_paused", 0))
COMING_EPS_SORT = check_setting_str(CFG, "GUI", "coming_eps_sort", "date")
newznabData = check_setting_str(CFG, "Newznab", "newznab_data", "")
newznabProviderList = providers.getNewznabProviderList(newznabData)
providerList = providers.makeProviderList()
logger.sb_log_instance.initLogging(consoleLogging=consoleLogging)
# initialize the main SB database
db.upgradeDatabase(db.DBConnection(), mainDB.InitialSchema)
# initialize the cache database
db.upgradeDatabase(db.DBConnection("cache.db"), cache_db.InitialSchema)
# fix up any db problems
db.sanityCheckDatabase(db.DBConnection(), mainDB.MainSanityCheck)
currentSearchScheduler = scheduler.Scheduler(
searchCurrent.CurrentSearcher(),
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY),
threadName="SEARCH",
runImmediately=True,
)
# the interval for this is stored inside the ShowUpdater class
showUpdaterInstance = showUpdater.ShowUpdater()
showUpdateScheduler = scheduler.Scheduler(
showUpdaterInstance,
cycleTime=showUpdaterInstance.updateInterval,
threadName="SHOWUPDATER",
runImmediately=False,
)
versionCheckScheduler = scheduler.Scheduler(
versionChecker.CheckVersion(),
cycleTime=datetime.timedelta(hours=12),
threadName="CHECKVERSION",
开发者ID:gordonturner,项目名称:Sick-Beard,代码行数:67,代码来源:__init__.py
示例10: str
try:
requests.head(_provider.url, verify=certifi.where(), timeout=10)
except requests.exceptions.SSLError as error:
if 'certificate verify failed' in str(error):
print('Cannot verify certificate for {0}'.format(_provider.name))
else:
print('SSLError on {0}: {1}'.format(_provider.name, ex(error.message)))
raise
except requests.exceptions.Timeout:
print('Provider timed out')
return _connectivity_test
class SniTests(unittest.TestCase):
pass
if __name__ == "__main__":
print("==================")
print("STARTING - Provider Connectivity TESTS and SSL/SNI")
print("==================")
print("######################################################################")
# Just checking all providers - we should make this error on non-existent urls.
for provider in [p for p in providers.makeProviderList()]:
test_name = 'test_{0}'.format(provider.name)
test = generator(provider)
setattr(SniTests, test_name, test)
SUITE = unittest.TestLoader().loadTestsFromTestCase(SniTests)
unittest.TextTestRunner(verbosity=2).run(SUITE)
开发者ID:Row,项目名称:SickRage,代码行数:30,代码来源:ssl_sni_tests.py
示例11: initialize
#.........这里部分代码省略.........
GIT_PATH = check_setting_str(CFG, "General", "git_path", "")
EXTRA_SCRIPTS = [x for x in check_setting_str(CFG, "General", "extra_scripts", "").split("|") if x]
METADATA_TYPE = check_setting_str(CFG, "General", "metadata_type", "xbmc")
METADATA_SHOW = bool(check_setting_int(CFG, "General", "metadata_show", 1))
METADATA_EPISODE = bool(check_setting_int(CFG, "General", "metadata_episode", 1))
ART_POSTER = bool(check_setting_int(CFG, "General", "art_poster", 1))
ART_FANART = bool(check_setting_int(CFG, "General", "art_fanart", 1))
ART_THUMBNAILS = bool(check_setting_int(CFG, "General", "art_thumbnails", 1))
ART_SEASON_THUMBNAILS = bool(check_setting_int(CFG, "General", "art_season_thumbnails", 1))
# try setting defaults if possible
try:
TEMP_CREATE_METADATA = bool(int(CFG["General"]["create_metadata"]))
METADATA_SHOW = TEMP_CREATE_METADATA
METADATA_EPISODE = TEMP_CREATE_METADATA
except:
pass
try:
TEMP_CREATE_IMAGES = bool(int(CFG["General"]["create_images"]))
ART_POSTER = TEMP_CREATE_IMAGES
ART_FANART = TEMP_CREATE_IMAGES
ART_THUMBNAILS = TEMP_CREATE_IMAGES
ART_SEASON_THUMBNAILS = TEMP_CREATE_IMAGES
except:
pass
newznabData = check_setting_str(CFG, "Newznab", "newznab_data", "")
newznabProviderList = providers.getNewznabProviderList(newznabData)
providerList = providers.makeProviderList()
metadata_generator = metadata.getMetadataClass(METADATA_TYPE)
logger.initLogging(consoleLogging=consoleLogging)
# initialize the main SB database
db.upgradeDatabase(db.DBConnection(), mainDB.InitialSchema)
currentSearchScheduler = scheduler.Scheduler(
searchCurrent.CurrentSearcher(),
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY),
threadName="SEARCH",
runImmediately=True,
)
backlogSearchScheduler = searchBacklog.BacklogSearchScheduler(
searchBacklog.BacklogSearcher(),
cycleTime=datetime.timedelta(minutes=get_backlog_cycle_time()),
threadName="BACKLOG",
runImmediately=False,
)
backlogSearchScheduler.action.cycleTime = BACKLOG_SEARCH_FREQUENCY
# the interval for this is stored inside the ShowUpdater class
showUpdaterInstance = showUpdater.ShowUpdater()
showUpdateScheduler = scheduler.Scheduler(
showUpdaterInstance,
cycleTime=showUpdaterInstance.updateInterval,
threadName="SHOWUPDATER",
runImmediately=False,
)
开发者ID:LethalCorpse,项目名称:Sick-Beard,代码行数:66,代码来源:__init__.py
示例12: initialize
#.........这里部分代码省略.........
if old_metadata_class:
METADATA_SHOW = bool(check_setting_int(CFG, 'General', 'metadata_show', 1))
METADATA_EPISODE = bool(check_setting_int(CFG, 'General', 'metadata_episode', 1))
ART_POSTER = bool(check_setting_int(CFG, 'General', 'art_poster', 1))
ART_FANART = bool(check_setting_int(CFG, 'General', 'art_fanart', 1))
ART_THUMBNAILS = bool(check_setting_int(CFG, 'General', 'art_thumbnails', 1))
ART_SEASON_THUMBNAILS = bool(check_setting_int(CFG, 'General', 'art_season_thumbnails', 1))
new_metadata_class = old_metadata_class(METADATA_SHOW,
METADATA_EPISODE,
ART_POSTER,
ART_FANART,
ART_THUMBNAILS,
ART_SEASON_THUMBNAILS)
metadata_provider_dict[new_metadata_class.name] = new_metadata_class
# this is the normal codepath for metadata config
else:
METADATA_XBMC = check_setting_str(CFG, 'General', 'metadata_xbmc', '0|0|0|0|0|0')
METADATA_MEDIABROWSER = check_setting_str(CFG, 'General', 'metadata_mediabrowser', '0|0|0|0|0|0')
METADATA_PS3 = check_setting_str(CFG, 'General', 'metadata_ps3', '0|0|0|0|0|0')
for cur_metadata_tuple in [(METADATA_XBMC, metadata.xbmc),
(METADATA_MEDIABROWSER, metadata.mediabrowser),
(METADATA_PS3, metadata.ps3),
]:
(cur_metadata_config, cur_metadata_class) = cur_metadata_tuple
tmp_provider = cur_metadata_class.metadata_class()
tmp_provider.set_config(cur_metadata_config)
metadata_provider_dict[tmp_provider.name] = tmp_provider
COMING_EPS_LAYOUT = check_setting_str(CFG, 'GUI', 'coming_eps_layout', 'banner')
COMING_EPS_DISPLAY_PAUSED = bool(check_setting_int(CFG, 'GUI', 'coming_eps_display_paused', 0))
COMING_EPS_SORT = check_setting_str(CFG, 'GUI', 'coming_eps_sort', 'date')
newznabData = check_setting_str(CFG, 'Newznab', 'newznab_data', '')
newznabProviderList = providers.getNewznabProviderList(newznabData)
providerList = providers.makeProviderList()
logger.initLogging(consoleLogging=consoleLogging)
# initialize the main SB database
db.upgradeDatabase(db.DBConnection(), mainDB.InitialSchema)
currentSearchScheduler = scheduler.Scheduler(searchCurrent.CurrentSearcher(),
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY),
threadName="SEARCH",
runImmediately=True)
backlogSearchScheduler = searchBacklog.BacklogSearchScheduler(searchBacklog.BacklogSearcher(),
cycleTime=datetime.timedelta(minutes=get_backlog_cycle_time()),
threadName="BACKLOG",
runImmediately=False)
backlogSearchScheduler.action.cycleTime = BACKLOG_SEARCH_FREQUENCY
# the interval for this is stored inside the ShowUpdater class
showUpdaterInstance = showUpdater.ShowUpdater()
showUpdateScheduler = scheduler.Scheduler(showUpdaterInstance,
cycleTime=showUpdaterInstance.updateInterval,
threadName="SHOWUPDATER",
runImmediately=False)
versionCheckScheduler = scheduler.Scheduler(versionChecker.CheckVersion(),
cycleTime=datetime.timedelta(hours=12),
threadName="CHECKVERSION",
runImmediately=True)
showQueueScheduler = scheduler.Scheduler(show_queue.ShowQueue(),
cycleTime=datetime.timedelta(seconds=3),
threadName="SHOWQUEUE",
silent=True)
searchQueueScheduler = scheduler.Scheduler(search_queue.SearchQueue(),
cycleTime=datetime.timedelta(seconds=3),
threadName="SEARCHQUEUE",
silent=True)
properFinderInstance = properFinder.ProperFinder()
properFinderScheduler = scheduler.Scheduler(properFinderInstance,
cycleTime=properFinderInstance.updateInterval,
threadName="FINDPROPERS",
runImmediately=False)
autoPostProcesserScheduler = scheduler.Scheduler(autoPostProcesser.PostProcesser(),
cycleTime=datetime.timedelta(minutes=10),
threadName="POSTPROCESSER",
runImmediately=True)
showList = []
loadingShowList = {}
__INITIALIZED__ = True
return True
开发者ID:davidakachaos,项目名称:Sick-Beard,代码行数:101,代码来源:__init__.py
注:本文中的sickbeard.providers.makeProviderList函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论