Fixes issue with update frequency.

Fixes backlog search issues with newznab providers.
This commit is contained in:
echel0n 2014-04-27 05:13:46 -07:00
parent 831e9a537e
commit b0ec12e421
3 changed files with 12 additions and 6 deletions

View file

@ -628,6 +628,10 @@ def initialize(consoleLogging=True):
if SEARCH_FREQUENCY < MIN_SEARCH_FREQUENCY:
SEARCH_FREQUENCY = MIN_SEARCH_FREQUENCY
UPDATE_FREQUENCY = check_setting_int(CFG, 'General', 'update_frequency', DEFAULT_UPDATE_FREQUENCY)
if UPDATE_FREQUENCY < UPDATE_FREQUENCY:
UPDATE_FREQUENCY = UPDATE_FREQUENCY
NZB_DIR = check_setting_str(CFG, 'Blackhole', 'nzb_dir', '')
TORRENT_DIR = check_setting_str(CFG, 'Blackhole', 'torrent_dir', '')
@ -976,7 +980,7 @@ def initialize(consoleLogging=True):
# initialize newznab providers
currentSearchScheduler = scheduler.Scheduler(searchCurrent.CurrentSearcher(),
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY or DEFAULT_SEARCH_FREQUENCY),
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY),
threadName="SEARCH",
runImmediately=True)
@ -988,7 +992,7 @@ def initialize(consoleLogging=True):
runImmediately=False)
versionCheckScheduler = scheduler.Scheduler(versionChecker.CheckVersion(),
cycleTime=datetime.timedelta(hours=UPDATE_FREQUENCY or DEFAULT_UPDATE_FREQUENCY),
cycleTime=datetime.timedelta(hours=UPDATE_FREQUENCY),
threadName="CHECKVERSION",
runImmediately=True)

View file

@ -246,6 +246,7 @@ class GenericProvider:
self._checkAuth()
for ep_obj in ep_objs:
if not seasonSearch:
logger.log(u'Searching "%s" for "%s" as "%s"'
% (self.name, ep_obj.prettyName(), ep_obj.scene_prettyName()))

View file

@ -98,10 +98,11 @@ class NewznabProvider(generic.NZBProvider):
# season
cur_params['season'] = str(season)
to_return.append(cur_params)
# episode
to_return['episode'] = self._get_episode_search_strings(show, season, episode, abd)[0]['ep']
cur_params['episode'] = self._get_episode_search_strings(show, season, episode, abd)[0]['ep']
to_return.append(cur_params)
return to_return