def get_scene_exception_by_name_multiple(show_name):
 out = []
 dbData = sorted([x[u'doc'] for x in sickrage.srCore.cacheDB.db.all(u'scene_exceptions', with_doc=True)], key=(lambda d: d[u'season']))
 exception_result = [x for x in dbData if (x[u'show_name'].lower() == show_name.lower())]
 if exception_result:
  return [(int(x[u'indexer_id']), int(x[u'season'])) for x in exception_result]
 for cur_exception in dbData:
  cur_exception_name = cur_exception[u'show_name']
  cur_indexer_id = int(cur_exception[u'indexer_id'])
  cur_season = int(cur_exception[u'season'])
  if (show_name.lower() in (cur_exception_name.lower(), sanitizeSceneName(cur_exception_name).lower().replace(u'.', u' '))):
   sickrage.srCore.srLogger.debug(((u'Scene exception lookup got indexer id ' + str(cur_indexer_id)) + u', using that'))
   out.append((cur_indexer_id, cur_season))
 if out:
  return out
 return [(None, None)]

def get_scene_exception_by_name_multiple ( show_name ) : out = [ ] dbData = sorted ( [ x [ u'doc' ] for x in sickrage . srCore . cacheDB . db . all ( u'scene_exceptions' , with_doc = True ) ] , key = ( lambda d : d [ u'season' ] ) ) exception_result = [ x for x in dbData if ( x [ u'show_name' ] . lower ( ) == show_name . lower ( ) ) ] if exception_result : return [ ( int ( x [ u'indexer_id' ] ) , int ( x [ u'season' ] ) ) for x in exception_result ] for cur_exception in dbData : cur_exception_name = cur_exception [ u'show_name' ] cur_indexer_id = int ( cur_exception [ u'indexer_id' ] ) cur_season = int ( cur_exception [ u'season' ] ) if ( show_name . lower ( ) in ( cur_exception_name . lower ( ) , sanitizeSceneName ( cur_exception_name ) . lower ( ) . replace ( u'.' , u' ' ) ) ) : sickrage . srCore . srLogger . debug ( ( ( u'Scene exception lookup got indexer id ' + str ( cur_indexer_id ) ) + u', using that' ) ) out . append ( ( cur_indexer_id , cur_season ) ) if out : return out return [ ( None , None ) ]
given a show name .