def update_scene_exceptions(indexer_id, scene_exceptions, season=(-1)):
 [sickrage.srCore.cacheDB.db.delete(x[u'doc']) for x in sickrage.srCore.cacheDB.db.get_many(u'scene_exceptions', indexer_id, with_doc=True) if (x[u'doc'][u'season'] == season)]
 sickrage.srCore.srLogger.info(u'Updating scene exceptions')
 if (indexer_id in exceptionsCache):
  exceptionsCache[indexer_id] = {}
 exceptionsCache[indexer_id][season] = scene_exceptions
 for cur_exception in scene_exceptions:
  sickrage.srCore.cacheDB.db.insert({u'_t': u'scene_exceptions', u'indexer_id': indexer_id, u'show_name': cur_exception, u'season': season})

def update_scene_exceptions ( indexer_id , scene_exceptions , season = ( - 1 ) ) : [ sickrage . srCore . cacheDB . db . delete ( x [ u'doc' ] ) for x in sickrage . srCore . cacheDB . db . get_many ( u'scene_exceptions' , indexer_id , with_doc = True ) if ( x [ u'doc' ] [ u'season' ] == season ) ] sickrage . srCore . srLogger . info ( u'Updating scene exceptions' ) if ( indexer_id in exceptionsCache ) : exceptionsCache [ indexer_id ] = { } exceptionsCache [ indexer_id ] [ season ] = scene_exceptions for cur_exception in scene_exceptions : sickrage . srCore . cacheDB . db . insert ( { u'_t' : u'scene_exceptions' , u'indexer_id' : indexer_id , u'show_name' : cur_exception , u'season' : season } )
given a indexer_id .