mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Conditional check bugfixes
This commit is contained in:
parent
bd84656517
commit
e171aa1c10
7 changed files with 11 additions and 12 deletions
|
@ -129,7 +129,7 @@ class CacheHandler(urllib2.BaseHandler):
|
||||||
def default_open(self, request):
|
def default_open(self, request):
|
||||||
"""Handles GET requests, if the response is cached it returns it
|
"""Handles GET requests, if the response is cached it returns it
|
||||||
"""
|
"""
|
||||||
if request.get_method() is not "GET":
|
if request.get_method() != "GET":
|
||||||
return None # let the next handler try to handle the request
|
return None # let the next handler try to handle the request
|
||||||
|
|
||||||
if exists_in_cache(
|
if exists_in_cache(
|
||||||
|
|
|
@ -433,7 +433,7 @@ class TVRage:
|
||||||
elm.tag = robj.sub(lambda m: reDict[m.group(0)], elm.tag)
|
elm.tag = robj.sub(lambda m: reDict[m.group(0)], elm.tag)
|
||||||
|
|
||||||
if elm.tag in 'firstaired' and elm.text:
|
if elm.tag in 'firstaired' and elm.text:
|
||||||
if elm.text is "0000-00-00":
|
if elm.text == "0000-00-00":
|
||||||
elm.text = str(dt.date.fromordinal(1))
|
elm.text = str(dt.date.fromordinal(1))
|
||||||
try:
|
try:
|
||||||
#month = strptime(match.group('air_month')[:3],'%b').tm_mon
|
#month = strptime(match.group('air_month')[:3],'%b').tm_mon
|
||||||
|
|
|
@ -129,7 +129,7 @@ class CacheHandler(urllib2.BaseHandler):
|
||||||
def default_open(self, request):
|
def default_open(self, request):
|
||||||
"""Handles GET requests, if the response is cached it returns it
|
"""Handles GET requests, if the response is cached it returns it
|
||||||
"""
|
"""
|
||||||
if request.get_method() is not "GET":
|
if request.get_method() != "GET":
|
||||||
return None # let the next handler try to handle the request
|
return None # let the next handler try to handle the request
|
||||||
|
|
||||||
if exists_in_cache(
|
if exists_in_cache(
|
||||||
|
|
|
@ -29,10 +29,10 @@ import urllib
|
||||||
from threading import Lock
|
from threading import Lock
|
||||||
|
|
||||||
# apparently py2exe won't build these unless they're imported somewhere
|
# apparently py2exe won't build these unless they're imported somewhere
|
||||||
from sickbeard import providers, metadata
|
from sickbeard import providers, metadata, config
|
||||||
from providers import ezrss, tvtorrents, btn, newznab, womble, thepiratebay, torrentleech, kat, publichd, iptorrents, \
|
from providers import ezrss, tvtorrents, btn, newznab, womble, thepiratebay, torrentleech, kat, publichd, iptorrents, \
|
||||||
omgwtfnzbs, scc, hdtorrents, torrentday, hdbits, nextgen
|
omgwtfnzbs, scc, hdtorrents, torrentday, hdbits, nextgen
|
||||||
from sickbeard.config import CheckSection, check_setting_int, check_setting_str, ConfigMigrator
|
from sickbeard.config import CheckSection, check_setting_int, check_setting_str, ConfigMigrator, naming_ep_type
|
||||||
from sickbeard import searchCurrent, searchBacklog, showUpdater, versionChecker, properFinder, autoPostProcesser, \
|
from sickbeard import searchCurrent, searchBacklog, showUpdater, versionChecker, properFinder, autoPostProcesser, \
|
||||||
subtitles, traktWatchListChecker
|
subtitles, traktWatchListChecker
|
||||||
from sickbeard import helpers, db, exceptions, show_queue, search_queue, scheduler, show_name_helpers
|
from sickbeard import helpers, db, exceptions, show_queue, search_queue, scheduler, show_name_helpers
|
||||||
|
|
|
@ -203,9 +203,9 @@ class BTNProvider(generic.TorrentProvider):
|
||||||
current_params = {}
|
current_params = {}
|
||||||
|
|
||||||
|
|
||||||
if show.indexer is 1:
|
if show.indexer == 1:
|
||||||
current_params['tvdb'] = show.indexerid
|
current_params['tvdb'] = show.indexerid
|
||||||
elif show.indexer is 2:
|
elif show.indexer == 2:
|
||||||
current_params['tvrage'] = show.indexerid
|
current_params['tvrage'] = show.indexerid
|
||||||
else:
|
else:
|
||||||
# Search by name if we don't have tvdb or tvrage id
|
# Search by name if we don't have tvdb or tvrage id
|
||||||
|
|
|
@ -2413,7 +2413,7 @@ class CMD_ShowStats(ApiCall):
|
||||||
episodes_stats["downloaded"] = {}
|
episodes_stats["downloaded"] = {}
|
||||||
# truning codes into strings
|
# truning codes into strings
|
||||||
for statusCode in episode_qualities_counts_download:
|
for statusCode in episode_qualities_counts_download:
|
||||||
if statusCode is "total":
|
if statusCode == "total":
|
||||||
episodes_stats["downloaded"]["total"] = episode_qualities_counts_download[statusCode]
|
episodes_stats["downloaded"]["total"] = episode_qualities_counts_download[statusCode]
|
||||||
continue
|
continue
|
||||||
status, quality = Quality.splitCompositeStatus(int(statusCode))
|
status, quality = Quality.splitCompositeStatus(int(statusCode))
|
||||||
|
@ -2424,7 +2424,7 @@ class CMD_ShowStats(ApiCall):
|
||||||
# truning codes into strings
|
# truning codes into strings
|
||||||
# and combining proper and normal
|
# and combining proper and normal
|
||||||
for statusCode in episode_qualities_counts_snatch:
|
for statusCode in episode_qualities_counts_snatch:
|
||||||
if statusCode is "total":
|
if statusCode == "total":
|
||||||
episodes_stats["snatched"]["total"] = episode_qualities_counts_snatch[statusCode]
|
episodes_stats["snatched"]["total"] = episode_qualities_counts_snatch[statusCode]
|
||||||
continue
|
continue
|
||||||
status, quality = Quality.splitCompositeStatus(int(statusCode))
|
status, quality = Quality.splitCompositeStatus(int(statusCode))
|
||||||
|
@ -2436,7 +2436,7 @@ class CMD_ShowStats(ApiCall):
|
||||||
|
|
||||||
#episodes_stats["total"] = {}
|
#episodes_stats["total"] = {}
|
||||||
for statusCode in episode_status_counts_total:
|
for statusCode in episode_status_counts_total:
|
||||||
if statusCode is "total":
|
if statusCode == "total":
|
||||||
episodes_stats["total"] = episode_status_counts_total[statusCode]
|
episodes_stats["total"] = episode_status_counts_total[statusCode]
|
||||||
continue
|
continue
|
||||||
status, quality = Quality.splitCompositeStatus(int(statusCode))
|
status, quality = Quality.splitCompositeStatus(int(statusCode))
|
||||||
|
|
|
@ -1904,8 +1904,7 @@ class HomePostProcess:
|
||||||
return _munge(t)
|
return _munge(t)
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def processEpisode(self, dir=None, nzbName=None, jobName=None, quiet=None, process_method=None,
|
def processEpisode(self, dir=None, nzbName=None, jobName=None, quiet=None, process_method=None, force=None, is_priority=None, failed="0", type="auto"):
|
||||||
force=None, is_priority=None, failed="0", type="auto"):
|
|
||||||
|
|
||||||
if failed == "0":
|
if failed == "0":
|
||||||
failed = False
|
failed = False
|
||||||
|
|
Loading…
Reference in a new issue