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):
"""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
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)
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))
try:
#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):
"""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
if exists_in_cache(

4
sickbeard/__init__.py

@ -29,10 +29,10 @@ import urllib
from threading import Lock
# 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, \
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, \
subtitles, traktWatchListChecker
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 = {}
if show.indexer is 1:
if show.indexer == 1:
current_params['tvdb'] = show.indexerid
elif show.indexer is 2:
elif show.indexer == 2:
current_params['tvrage'] = show.indexerid
else:
# 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"] = {}
# truning codes into strings
for statusCode in episode_qualities_counts_download:
if statusCode is "total":
if statusCode == "total":
episodes_stats["downloaded"]["total"] = episode_qualities_counts_download[statusCode]
continue
status, quality = Quality.splitCompositeStatus(int(statusCode))
@ -2424,7 +2424,7 @@ class CMD_ShowStats(ApiCall):
# truning codes into strings
# and combining proper and normal
for statusCode in episode_qualities_counts_snatch:
if statusCode is "total":
if statusCode == "total":
episodes_stats["snatched"]["total"] = episode_qualities_counts_snatch[statusCode]
continue
status, quality = Quality.splitCompositeStatus(int(statusCode))
@ -2436,7 +2436,7 @@ class CMD_ShowStats(ApiCall):
#episodes_stats["total"] = {}
for statusCode in episode_status_counts_total:
if statusCode is "total":
if statusCode == "total":
episodes_stats["total"] = episode_status_counts_total[statusCode]
continue
status, quality = Quality.splitCompositeStatus(int(statusCode))

3
sickbeard/webserve.py

@ -1904,8 +1904,7 @@ class HomePostProcess:
return _munge(t)
@cherrypy.expose
def processEpisode(self, dir=None, nzbName=None, jobName=None, quiet=None, process_method=None,
force=None, is_priority=None, failed="0", type="auto"):
def processEpisode(self, dir=None, nzbName=None, jobName=None, quiet=None, process_method=None, force=None, is_priority=None, failed="0", type="auto"):
if failed == "0":
failed = False

Loading…
Cancel
Save