platypush/plugins/music/spotify/__init__.py
def remove_from_playlist(self, playlist: str, resources: Union[str, Iterable[str]]):
        """
        Remove one or more items from a playlist.

        :param playlist: Playlist name, ID or URI.
        :param resources: URI(s) of the resource(s) to be removed. A maximum of 100 tracks can be provided at once.
        """
        playlist = self._get_playlist(playlist)
        response = self.spotify_user_call(
            f'/v1/playlists/{playlist["id"]}/tracks',
            method='delete',
            json={
                'tracks': [
                    {'uri': uri.strip()}
                    for uri in (
                        resources.split(',') if isinstance(resources, str) else resources
                    )
                ]
            }
        )

        snapshot_id = response.get('snapshot_id')
        assert snapshot_id is not None, 'Could not save playlist'

        Remove one or more items from a playlist.

        :param playlist: Playlist name, ID or URI.
        :param resources: URI(s) of the resource(s) to be removed. A maximum of 100 tracks can be provided at once.
        
Remove one or more items from a playlist.
Remove one or more items from a playlist .
def remove_from_playlist(self, playlist: str, resources: Union[str, Iterable[str]]):
        playlist = self._get_playlist(playlist)
        response = self.spotify_user_call(
            f'/v1/playlists/{playlist["id"]}/tracks',
            method='delete',
            json={
                'tracks': [
                    {'uri': uri.strip()}
                    for uri in (
                        resources.split(',') if isinstance(resources, str) else resources
                    )
                ]
            }
        )
        snapshot_id = response.get('snapshot_id')
        assert snapshot_id is not None, 'Could not save playlist'
def remove_from_playlist ( self , playlist : str , resources : Union [ str , Iterable [ str ] ] ) : playlist = self . _get_playlist ( playlist ) response = self . spotify_user_call ( f'/v1/playlists/{playlist["id"]}/tracks' , method = 'delete' , json = { 'tracks' : [ { 'uri' : uri . strip ( ) } for uri in ( resources . split ( ',' ) if isinstance ( resources , str ) else resources ) ] } ) snapshot_id = response . get ( 'snapshot_id' ) assert snapshot_id is not None , 'Could not save playlist'
Remove one or more items from a playlist.
Remove one or more items from a playlist .
"""
        Remove one or more items from a playlist.

        :param playlist: Playlist name, ID or URI.
        :param resources: URI(s) of the resource(s) to be removed. A maximum of 100 tracks can be provided at once.
        """
self
playlist
str
Playlist name, ID or URI.
Playlist name ID or URI .
resources
Union[str, Iterable[str]]
URI(s) of the resource(s) to be removed. A maximum of 100 tracks can be provided at once.
URI ( s ) of the resource ( s ) to be removed . A maximum of 100 tracks can be provided at once .