def get_absolute_number_from_season_and_episode(show, season, episode):
 absolute_number = None
 if (season and episode):
  main_db_con = db.DBConnection()
  sql = u'SELECT * FROM tv_episodes WHERE showid = ? and season = ? and episode = ?'
  sql_results = main_db_con.select(sql, [show.indexerid, season, episode])
  if (len(sql_results) == 1):
   absolute_number = int(sql_results[0]['absolute_number'])
   logger.log(u'Found absolute number {absolute} for show {show} {ep}'.format(absolute=absolute_number, show=show.name, ep=episode_num(season, episode)), logger.DEBUG)
  else:
   logger.log(u'No entries for absolute number for show {show} {ep}'.format(show=show.name, ep=episode_num(season, episode)), logger.DEBUG)
 return absolute_number

def get_absolute_number_from_season_and_episode ( show , season , episode ) : absolute_number = None if ( season and episode ) : main_db_con = db . DBConnection ( ) sql = u'SELECT * FROM tv_episodes WHERE showid = ? and season = ? and episode = ?' sql_results = main_db_con . select ( sql , [ show . indexerid , season , episode ] ) if ( len ( sql_results ) == 1 ) : absolute_number = int ( sql_results [ 0 ] [ 'absolute_number' ] ) logger . log ( u'Found absolute number {absolute} for show {show} {ep}' . format ( absolute = absolute_number , show = show . name , ep = episode_num ( season , episode ) ) , logger . DEBUG ) else : logger . log ( u'No entries for absolute number for show {show} {ep}' . format ( show = show . name , ep = episode_num ( season , episode ) ) , logger . DEBUG ) return absolute_number
find the absolute number for a show episode .