@gen.coroutine
def OldRemovePhotos(client, obj_store, user_id, device_id, request):
 remove_episodes = []
 hide_episodes = []
 for ep_dict in request['episodes']:
  episode = (yield gen.Task(Episode.Query, client, ep_dict['episode_id'], None, must_exist=False))
  if ((episode is None) or (episode.viewpoint_id == base.ViewfinderContext.current().user.private_vp_id)):
   remove_episodes.append(ep_dict)
  else:
   hide_episodes.append(ep_dict)
 hide_request = deepcopy(request)
 if (len(hide_episodes) > 0):
  hide_request['episodes'] = hide_episodes
  (yield HidePhotos(client, obj_store, user_id, device_id, hide_request))
 remove_request = deepcopy(request)
 remove_request['episodes'] = remove_episodes
 (yield RemovePhotos(client, obj_store, user_id, device_id, remove_request))
 raise gen.Return({})

@ gen . coroutine def OldRemovePhotos ( client , obj_store , user_id , device_id , request ) : remove_episodes = [ ] hide_episodes = [ ] for ep_dict in request [ 'episodes' ] : episode = ( yield gen . Task ( Episode . Query , client , ep_dict [ 'episode_id' ] , None , must_exist = False ) ) if ( ( episode is None ) or ( episode . viewpoint_id == base . ViewfinderContext . current ( ) . user . private_vp_id ) ) : remove_episodes . append ( ep_dict ) else : hide_episodes . append ( ep_dict ) hide_request = deepcopy ( request ) if ( len ( hide_episodes ) > 0 ) : hide_request [ 'episodes' ] = hide_episodes ( yield HidePhotos ( client , obj_store , user_id , device_id , hide_request ) ) remove_request = deepcopy ( request ) remove_request [ 'episodes' ] = remove_episodes ( yield RemovePhotos ( client , obj_store , user_id , device_id , remove_request ) ) raise gen . Return ( { } )
used by older clients to remove photos from showing in a users personal library .