exceptException:# ignore the exception, because we kind of expected it, but create parse_result anyway so we can perform a check on it.
parse_result=False
search_sql="SELECT tv_episodes.indexerid, history.resource FROM tv_episodes INNER JOIN history ON history.showid=tv_episodes.showid"# This part is always the same
search_sql+=" WHERE history.season=tv_episodes.season and history.episode=tv_episodes.episode"
# If we find a showid, a season number, and one or more episode numbers then we need to use those in the query
search_sql+=" and tv_episodes.showid = '"+str(parse_result.show.indexerid)+"' and tv_episodes.season = '"+str(parse_result.season_number)+"' and tv_episodes.episode = '"+str(parse_result.episode_numbers[0])+"'"
search_sql+=" and tv_episodes.status IN ("+",".join([str(x)forxincommon.Quality.DOWNLOADED])+")"
search_sql+=" and history.resource LIKE ?"
search_sql+=" and history.resource LIKE ? LIMIT 1"
sqlResult=myDB.select(search_sql,['%'+videofile])
ifsqlResult:
# result.output += logHelper(u"You're trying to post process a video that's already been processed, skipping", logger.DEBUG)