diff --git a/SickBeard.py b/SickBeard.py index 49328f62..a12d5459 100755 --- a/SickBeard.py +++ b/SickBeard.py @@ -66,6 +66,7 @@ from sickbeard.webserveInit import SRWebServer from sickbeard.version import SICKBEARD_VERSION from sickbeard.databases.mainDB import MIN_DB_VERSION from sickbeard.databases.mainDB import MAX_DB_VERSION +from sickbeard import exceptions from lib.configobj import ConfigObj @@ -259,6 +260,9 @@ class SickRage(object): # Get PID sickbeard.PID = os.getpid() + # Build from the DB to start with + self.loadShowsFromDB() + if self.forcedPort: logger.log(u"Forcing web server to port " + str(self.forcedPort)) self.startPort = self.forcedPort @@ -310,9 +314,6 @@ class SickRage(object): if self.consoleLogging: print "Starting up SickRage " + SICKBEARD_VERSION + " from " + sickbeard.CONFIG_FILE - # Build from the DB to start with - self.loadShowsFromDB() - # Fire up all our threads sickbeard.start() @@ -420,7 +421,6 @@ class SickRage(object): logger.log( u"There was an error creating the show in " + sqlShow["location"] + ": " + str(e).decode('utf-8'), logger.ERROR) - logger.log(traceback.format_exc(), logger.DEBUG) def restore(self, srcDir, dstDir): try: diff --git a/sickbeard/providers/kat.py b/sickbeard/providers/kat.py index 21d5e088..b8424d20 100644 --- a/sickbeard/providers/kat.py +++ b/sickbeard/providers/kat.py @@ -64,7 +64,7 @@ class KATProvider(generic.TorrentProvider): self.cache = KATCache(self) - self.urls = ['http://kickass.to/', 'http://katproxy.com'] + self.urls = ['http://kickass.to/', 'http://katproxy.com/'] def isEnabled(self): return self.enabled diff --git a/sickbeard/tv.py b/sickbeard/tv.py index 249ddbbd..5379eb35 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -96,7 +96,7 @@ class TVShow(object): self.lock = threading.Lock() self.isDirGood = False self.episodes = {} - self.nextaired = None + self.nextaired = "" otherShow = helpers.findCertainShow(sickbeard.showList, self.indexerid) if otherShow != None: @@ -988,7 +988,7 @@ class TVShow(object): if sqlResults == None or len(sqlResults) == 0: logger.log(str(self.indexerid) + u": No episode found... need to implement a show status", logger.DEBUG) - self.nextaired = None + self.nextaired = "" else: logger.log(str(self.indexerid) + u": Found episode " + str(sqlResults[0]["season"]) + "x" + str( sqlResults[0]["episode"]), logger.DEBUG)