def buildNameCache(show=None):
 with nameCacheLock:
  sickbeard.scene_exceptions.retrieve_exceptions()
 if (not show):
  for show in sickbeard.showList:
   buildNameCache(show)
 else:
  clearCache(show.indexerid)
  for curSeason in ([(-1)] + sickbeard.scene_exceptions.get_scene_seasons(show.indexerid)):
   for name in set((sickbeard.scene_exceptions.get_scene_exceptions(show.indexerid, season=curSeason) + [show.name])):
    name = sickbeard.helpers.full_sanitizeSceneName(name)
    if (name in nameCache):
     continue
    nameCache[name] = int(show.indexerid)

def buildNameCache ( show = None ) : with nameCacheLock : sickbeard . scene_exceptions . retrieve_exceptions ( ) if ( not show ) : for show in sickbeard . showList : buildNameCache ( show ) else : clearCache ( show . indexerid ) for curSeason in ( [ ( - 1 ) ] + sickbeard . scene_exceptions . get_scene_seasons ( show . indexerid ) ) : for name in set ( ( sickbeard . scene_exceptions . get_scene_exceptions ( show . indexerid , season = curSeason ) + [ show . name ] ) ) : name = sickbeard . helpers . full_sanitizeSceneName ( name ) if ( name in nameCache ) : continue nameCache [ name ] = int ( show . indexerid )
build internal name cache .