#NEWLINE# @ utils . accept_singleton ( basestring , 2 ) #NEWLINE# @ utils . empty_arg_shortcircuit ( position = 2 ) #NEWLINE# def _remove_entries_from_playlist( self , playlist_id , entry_ids_to_remove ) : #NEWLINE# #INDENT# 'Removes entries from a playlist. Returns a list of removed "sid_eid" strings.\n\n        :param playlist_id: the playlist to be modified.\n        :param entry_ids: a list of entry ids, or a single entry id.\n        ' #NEWLINE# playlist_tracks = self . get_playlist_songs ( playlist_id ) #NEWLINE# remove_eid_set = set ( entry_ids_to_remove ) #NEWLINE# e_s_id_pairs = [ ( t [ 'id' ] , t [ 'playlistEntryId' ] ) for t in playlist_tracks if ( t [ 'playlistEntryId' ] in remove_eid_set ) ] #NEWLINE# num_not_found = ( len ( entry_ids_to_remove ) - len ( e_s_id_pairs ) ) #NEWLINE# if ( num_not_found > 0 ) : #NEWLINE# #INDENT# self . logger . warning ( 'when removing, %d entry ids could not be found in playlist id %s' , num_not_found , playlist_id ) #NEWLINE# #UNINDENT# ( sids , eids ) = list ( zip ( * e_s_id_pairs ) ) #NEWLINE# res = self . _make_call ( webclient . DeleteSongs , sids , playlist_id , eids ) #NEWLINE# return res [ 'deleteIds' ]