checking to see if the cached items exist before loading them

This commit is contained in:
Erik Kristensen 2010-09-03 22:50:30 -04:00
parent 7586c0cbca
commit fb67938cdc
2 changed files with 6 additions and 4 deletions

View File

@ -171,7 +171,9 @@ class MythBoxee:
self.recs = self.be.getRecordings()
if self.config.GetValue("cache.banners"):
self.banners = pickle.loads(self.config.GetValue("cache.banners"))
if self.config.GetValue("cache.series"):
self.series = pickle.loads(self.config.GetValue("cache.series"))
if not cacheTime or mainItems == 0 or cacheTime <= str(time.time() - 2400):
@ -768,7 +770,7 @@ class MythBoxee:
freespacesummary = self.be.getFreeSpaceSummary()
recorders = self.be.getRecorderList()
upcoming = self.be.getUpcomingRecordings()
except MythError, e:
except Exception, e:
self.log("def(StatusInit): Exception: " + e.message)
mc.ShowDialogOk("MythBoxee", "Whoops! Something went wrong while trying to load this screen. Try again.")
self.config.Reset("loadingstatus")