ytmusicapi/mixins/playlists.py
def remove_playlist_items(self, playlistId: str, videos: List[Dict]) -> Union[str, Dict]:
        """
        Remove songs from an existing playlist

        :param playlistId: Playlist id
        :param videos: List of PlaylistItems, see :py:func:`get_playlist`.
            Must contain videoId and setVideoId
        :return: Status String or full response
        """
        self._check_auth()
        videos = list(filter(lambda x: 'videoId' in x and 'setVideoId' in x, videos))
        if len(videos) == 0:
            raise Exception(
                "Cannot remove songs, because setVideoId is missing. Do you own this playlist?")

        body = {'playlistId': playlistId, 'actions': []}
        for video in videos:
            body['actions'].append({
                'setVideoId': video['setVideoId'],
                'removedVideoId': video['videoId'],
                'action': 'ACTION_REMOVE_VIDEO'
            })

        endpoint = 'browse/edit_playlist'
        response = self._send_request(endpoint, body)
        return response['status'] if 'status' in response else response

        Remove songs from an existing playlist

        :param playlistId: Playlist id
        :param videos: List of PlaylistItems, see :py:func:`get_playlist`.
            Must contain videoId and setVideoId
        :return: Status String or full response
        
Remove songs from an existing playlist
Remove songs from an existing playlist
def remove_playlist_items(self, playlistId: str, videos: List[Dict]) -> Union[str, Dict]:
        self._check_auth()
        videos = list(filter(lambda x: 'videoId' in x and 'setVideoId' in x, videos))
        if len(videos) == 0:
            raise Exception(
                "Cannot remove songs, because setVideoId is missing. Do you own this playlist?")
        body = {'playlistId': playlistId, 'actions': []}
        for video in videos:
            body['actions'].append({
                'setVideoId': video['setVideoId'],
                'removedVideoId': video['videoId'],
                'action': 'ACTION_REMOVE_VIDEO'
            })
        endpoint = 'browse/edit_playlist'
        response = self._send_request(endpoint, body)
        return response['status'] if 'status' in response else response
def remove_playlist_items ( self , playlistId : str , videos : List [ Dict ] ) -> Union [ str , Dict ] : self . _check_auth ( ) videos = list ( filter ( lambda x : 'videoId' in x and 'setVideoId' in x , videos ) ) if len ( videos ) == 0 : raise Exception ( "Cannot remove songs, because setVideoId is missing. Do you own this playlist?" ) body = { 'playlistId' : playlistId , 'actions' : [ ] } for video in videos : body [ 'actions' ] . append ( { 'setVideoId' : video [ 'setVideoId' ] , 'removedVideoId' : video [ 'videoId' ] , 'action' : 'ACTION_REMOVE_VIDEO' } ) endpoint = 'browse/edit_playlist' response = self . _send_request ( endpoint , body ) return response [ 'status' ] if 'status' in response else response
Remove songs from an existing playlist
Remove songs from an existing playlist
"""
        Remove songs from an existing playlist

        :param playlistId: Playlist id
        :param videos: List of PlaylistItems, see :py:func:`get_playlist`.
            Must contain videoId and setVideoId
        :return: Status String or full response
        """
Status String or full response
Status String or full response
self
playlistId
str
None
videos
List[Dict]
List of PlaylistItems, see :py:func:`get_playlist`.
Must contain videoId and setVideoId
List of PlaylistItems see : py : func : ` get_playlist ` . Must contain videoId and setVideoId