remove_playlist_items: remove invalid items from list (closes #88)
This commit is contained in:
parent
bf32ba7221
commit
c93f66471c
1 changed files with 2 additions and 1 deletions
|
|
@ -252,7 +252,8 @@ class PlaylistsMixin:
|
|||
:return: Status String or full response
|
||||
"""
|
||||
self._check_auth()
|
||||
if not videos[0]['setVideoId']:
|
||||
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?")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue