def find_xem_absolute_numbering(indexer_id, indexer, absolute_number):
 if ((indexer_id is None) or (absolute_number is None)):
  return absolute_number
 indexer_id = int(indexer_id)
 indexer = int(indexer)
 xem_refresh(indexer_id, indexer)
 main_db_con = db.DBConnection()
 rows = main_db_con.select('SELECT scene_absolute_number FROM tv_episodes WHERE indexer = ? and showid = ? and absolute_number = ? and scene_absolute_number != 0', [indexer, indexer_id, absolute_number])
 if rows:
  return int(rows[0]['scene_absolute_number'])

def find_xem_absolute_numbering ( indexer_id , indexer , absolute_number ) : if ( ( indexer_id is None ) or ( absolute_number is None ) ) : return absolute_number indexer_id = int ( indexer_id ) indexer = int ( indexer ) xem_refresh ( indexer_id , indexer ) main_db_con = db . DBConnection ( ) rows = main_db_con . select ( 'SELECT scene_absolute_number FROM tv_episodes WHERE indexer = ? and showid = ? and absolute_number = ? and scene_absolute_number != 0' , [ indexer , indexer_id , absolute_number ] ) if rows : return int ( rows [ 0 ] [ 'scene_absolute_number' ] )
returns the scene numbering .