self.connection.action("UPDATE tv_episodes SET file_size = ? WHERE episode_id = ?",[cur_size,int(cur_ep["episode_id"])])
history_results=self.connection.select("SELECT * FROM history WHERE provider = -1")
# check each snatch to see if we can use it to get a release name from
history_results=self.connection.select("SELECT * FROM history WHERE provider != -1 ORDER BY date ASC")
logger.log(u"Adding release name to all episodes still in history")
forcur_resultinhistory_results:
# find the associated snatch
snatch_results=self.connection.select("SELECT resource, quality FROM history WHERE provider != -1 AND showid = ? AND season = ? AND episode = ? AND date < ?",
# find the associated download, if there isn't one then ignore it
download_results=self.connection.select("SELECT resource FROM history WHERE provider = -1 AND showid = ? AND season = ? AND episode = ? AND date > ?",