diff --git a/tidalapi/playlist.py b/tidalapi/playlist.py index 7a80f61..264dad2 100644 --- a/tidalapi/playlist.py +++ b/tidalapi/playlist.py @@ -205,6 +205,12 @@ def remove_by_index(self, index): headers = {'If-None-Match': self._etag} self.requests.request('DELETE', (self._base_url + '/items/%i') % (self.id, index), headers=headers) + def remove_by_indices(self, indices): + headers = {'If-None-Match': self._etag} + track_index_string = ",".join([str(x) for x in indices]) + self.requests.request('DELETE', (self._base_url + '/tracks/%s') % (self.id, track_index_string), + headers=headers) + def _calculate_id(self, media_id): i = 0 while i < self.num_tracks: