def get_indexer_numbering_for_xem(indexer_id, indexer, sceneSeason, sceneEpisode):
 if ((indexer_id is None) or (sceneSeason is None) or (sceneEpisode is None)):
  return (sceneSeason, sceneEpisode)
 indexer_id = int(indexer_id)
 indexer = int(indexer)
 xem_refresh(indexer_id, indexer)
 dbData = [x[u'doc'] for x in sickrage.srCore.mainDB.db.get_many(u'tv_episodes', indexer_id, with_doc=True) if ((x[u'doc'][u'indexer'] == indexer) and (x[u'doc'][u'scene_season'] == sceneSeason) and (x[u'doc'][u'scene_episode'] == sceneEpisode))]
 if dbData:
  return (int((dbData[0][u'season'] or 0)), int((dbData[0][u'episode'] or 0)))
 return (sceneSeason, sceneEpisode)

def get_indexer_numbering_for_xem ( indexer_id , indexer , sceneSeason , sceneEpisode ) : if ( ( indexer_id is None ) or ( sceneSeason is None ) or ( sceneEpisode is None ) ) : return ( sceneSeason , sceneEpisode ) indexer_id = int ( indexer_id ) indexer = int ( indexer ) xem_refresh ( indexer_id , indexer ) dbData = [ x [ u'doc' ] for x in sickrage . srCore . mainDB . db . get_many ( u'tv_episodes' , indexer_id , with_doc = True ) if ( ( x [ u'doc' ] [ u'indexer' ] == indexer ) and ( x [ u'doc' ] [ u'scene_season' ] == sceneSeason ) and ( x [ u'doc' ] [ u'scene_episode' ] == sceneEpisode ) ) ] if dbData : return ( int ( ( dbData [ 0 ] [ u'season' ] or 0 ) ) , int ( ( dbData [ 0 ] [ u'episode' ] or 0 ) ) ) return ( sceneSeason , sceneEpisode )
reverse of find_xem_numbering: lookup a tvdb season and episode using scene numbering .