if title is a list create list of titles to check against.
This commit is contained in:
parent
244e8ad71c
commit
abff846216
@ -637,7 +637,8 @@ def delete_playlist(playlist_dict, title):
|
|||||||
.format(playlist=playlist, user=user))
|
.format(playlist=playlist, user=user))
|
||||||
if isinstance(title, list):
|
if isinstance(title, list):
|
||||||
# If list then removing selected playlists
|
# If list then removing selected playlists
|
||||||
if playlist.title in title:
|
playlists_titles = [pl.title for pl in title]
|
||||||
|
if playlist.title in playlists_titles:
|
||||||
playlist.delete()
|
playlist.delete()
|
||||||
logger.info("...Deleted Playlist: {playlist.title} for '{user}'."
|
logger.info("...Deleted Playlist: {playlist.title} for '{user}'."
|
||||||
.format(playlist=playlist, user=user))
|
.format(playlist=playlist, user=user))
|
||||||
|
Loading…
Reference in New Issue
Block a user