Delete songs from library.

		Parameters:
			song (list): A list of song dicts.

		Returns:
			list: Successfully deleted song IDs.
979627
def songs_delete(self, songs):
		

		mutations = [mc_calls.TrackBatch.delete(song['id']) for song in songs]
		response = self._call(
			mc_calls.TrackBatch,
			mutations
		)

		success_ids = [
			res['id']
			for res in response.body['mutate_response']
			if res['response_code'] == 'OK'
		]

		# TODO: Report failures.
		# failure_ids = [
		# 	res['id']
		# 	for res in response.body['mutate_response']
		# 	if res['response_code'] != 'OK'
		# ]

		return success_ids
457875
def delete(self, **kwargs):
        

        return self._client['users/*/lists/*'].delete(self.username, self.id, **kwargs)
18494
def delete_file(self, file_id, file_etag=None):
		''''''
		return self( join('files', bytes(file_id)), method='delete',
			headers={'If-Match': file_etag} if file_etag else dict() )
122498
def delete(self, path_list, **kwargs):
        
        data = {
            'filelist': json.dumps([path for path in path_list])
        }
        url = 'http://{0}/api/filemanager?opera=delete'.format(BAIDUPAN_SERVER)
        return self._request('filemanager', 'delete', url=url, data=data, **kwargs)
257291
def delete_one(self, source=None, **kw):
		
		
		collection = self.get_collection(source)
		return collection.delete_one(self.__class__.id == self, **kw)
127694
def remove_from_list
      begin
        matching_results_ids = session[:matching_results_ids]
        matching_results_ids.delete(params[:remove_id].to_i)
        session[:matching_results_ids] = matching_results_ids
        render :nothing => true
      rescue
        render :nothing => true, :status => 500
      end
    end
758388
def clear_cache(self):
        """"""
        self.logger.debug("Clearing cache")
        if os.path.isdir(self.songcache_dir):
            for filename in os.listdir(self.songcache_dir):
                file_path = os.path.join(self.songcache_dir, filename)
                try:
                    if os.path.isfile(file_path):
                        os.unlink(file_path)
                except PermissionError:
                    pass
                except Exception as e:
                    logger.exception(e)
        self.logger.debug("Cache cleared")
109715
def delete(self,*args):
		
		if args:
			args=args[0] if utils.is_list(args[0]) else args
			path=utils.dict_path(self.__dict__)
			for _ in args:
				if _ in self.__dict__.keys():
					raise Exception('"{0}" cannot be deleted'.format(_))

			for a in args:
				try:
					if a in ('shapes'):
						self.layout[a].clear()
					elif a=='annotations':
						self.layout['annotations']={'values':[],'params':{}}
					else:
						del reduce(dict.get, path[a],self.__dict__)[a]
				except:
					raise Exception('Key: {0} not found'.format(a))
333702
def load_songs
      @songs = []
      playlist = @client.request('getPlaylistByID', playlistID: @id)
      @songs = playlist['songs'].map! do |s|
        Song.new(s)
      end if playlist.key?('songs')
      @songs
    end
185418
def remove(self, song):
        
        if song in self._songs:
            if self._current_song is None:
                self._songs.remove(song)
            elif song == self._current_song:
                next_song = self.next_song
                # 随机模式下或者歌单只剩一首歌曲，下一首可能和当前歌曲相同
                if next_song == self.current_song:
                    self.current_song = None
                    self._songs.remove(song)
                    self.current_song = self.next_song
                else:
                    self.current_song = self.next_song
                    self._songs.remove(song)
            else:
                self._songs.remove(song)
            logger.debug('Remove {} from player playlist'.format(song))
        else:
            logger.debug('Remove failed: {} not in playlist'.format(song))

        if song in self._bad_songs:
            self._bad_songs.remove(song)
1004691
async def songs(self):
    '''
    '''
    items = []
    for i in await self.items:
      if i.type == 'Audio':
        items.append(i)
      elif hasattr(i, 'songs'):
        items.extend(await i.songs)
    return items
580220
def _action_remove(self, ids):
        
        return self._action_get((self.unlisten_to_node(id_) for id_ in ids))
455159
def _delete(self, identifier=None):
        
        query = text("""
            DELETE FROM identifier_index
            WHERE identifier = :identifier;
        """)
        self.backend.library.database.connection.execute(query, identifier=identifier)
952616
def playlist(self, playlist_id, *, include_songs=False):
		

		playlist_info = next(
			(
				playlist
				for playlist in self.playlists(include_songs=include_songs)
				if playlist['id'] == playlist_id
			),
			None
		)

		return playlist_info
1158374
def remove_all_for(self, key):
        
        if not isinstance(key, _string_type):
            raise TypeError("Key need to be a string.")

        for idx in _range(self.__kcount[key]):
            super(VDFDict, self).__delitem__((idx, key))

        self.__omap = list(filter(lambda x: x[1] != key, self.__omap))

        del self.__kcount[key]
766135
async def remove_items(self, *items):
    '''
    '''
    items = [i.id for i in (await self.process(items)) if i in self.items]
    if not items:
      return

    await self.connector.delete(
      'Playlists/{Id}/Items'.format(Id=self.id),
      EntryIds=','.join(items),
      remote=False
    )
1338164
def delete(options = {})
      return each({ match: '*', count: 500, max_iterations: 1_000_000, batch_size: 500 }.merge(options)) do |keys|
        @connection.del(*keys)
      end
    end