def get_xem_absolute_numbering_for_show(indexer_id, indexer):
 if (indexer_id is None):
  return {}
 indexer_id = int(indexer_id)
 indexer = int(indexer)
 xem_refresh(indexer_id, indexer)
 result = {}
 main_db_con = db.DBConnection()
 rows = main_db_con.select('SELECT absolute_number, scene_absolute_number FROM tv_episodes WHERE indexer = ? and showid = ? and scene_absolute_number != 0 ORDER BY absolute_number', [indexer, indexer_id])
 for row in rows:
  absolute_number = int(row['absolute_number'])
  scene_absolute_number = int(row['scene_absolute_number'])
  result[absolute_number] = scene_absolute_number
 return result

def get_xem_absolute_numbering_for_show ( indexer_id , indexer ) : if ( indexer_id is None ) : return { } indexer_id = int ( indexer_id ) indexer = int ( indexer ) xem_refresh ( indexer_id , indexer ) result = { } main_db_con = db . DBConnection ( ) rows = main_db_con . select ( 'SELECT absolute_number, scene_absolute_number FROM tv_episodes WHERE indexer = ? and showid = ? and scene_absolute_number != 0 ORDER BY absolute_number' , [ indexer , indexer_id ] ) for row in rows : absolute_number = int ( row [ 'absolute_number' ] ) scene_absolute_number = int ( row [ 'scene_absolute_number' ] ) result [ absolute_number ] = scene_absolute_number return result
returns a dict of : mappings for an entire show .