def loadShowsFromDB():
 myDB = db.DBConnection()
 sqlResults = myDB.select('SELECT * FROM tv_shows')
 for sqlShow in sqlResults:
  try:
   curShow = TVShow(int(sqlShow['tvdb_id']))
   sickbeard.showList.append(curShow)
  except Exception as e:
   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 loadShowsFromDB ( ) : myDB = db . DBConnection ( ) sqlResults = myDB . select ( 'SELECT * FROM tv_shows' ) for sqlShow in sqlResults : try : curShow = TVShow ( int ( sqlShow [ 'tvdb_id' ] ) ) sickbeard . showList . append ( curShow ) except Exception as e : 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 )
populates the showlist with shows from the database .