Browse Source

Conditional check bugfixes

tags/release_0.1.0
echel0n 11 years ago
parent
commit
e171aa1c10
  1. 2
      lib/tvdb_api/tvdb_cache.py
  2. 2
      lib/tvrage_api/tvrage_api.py
  3. 2
      lib/tvrage_api/tvrage_cache.py
  4. 4
      sickbeard/__init__.py
  5. 4
      sickbeard/providers/btn.py
  6. 6
      sickbeard/webapi.py
  7. 3
      sickbeard/webserve.py

2
lib/tvdb_api/tvdb_cache.py

@ -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(

2
lib/tvrage_api/tvrage_api.py

@ -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

2
lib/tvrage_api/tvrage_cache.py

@ -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(

4
sickbeard/__init__.py

@ -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

4
sickbeard/providers/btn.py

@ -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

6
sickbeard/webapi.py

@ -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))

3
sickbeard/webserve.py

@ -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…
Cancel
Save