include check for whether or not the title template returns anything
in the case of returning nothing, script would delete every playlist Resolves #303
This commit is contained in:
parent
a479596b35
commit
c84cee5fec
@ -628,7 +628,7 @@ def delete_playlist(playlist_dict, title, jbop=None):
|
||||
# catching for history* jbops
|
||||
titleTemplate = selectors().get(jbop)
|
||||
titleStart = titleTemplate.split('{')[0]
|
||||
if playlist.title.startswith(titleStart):
|
||||
if titleStart and playlist.title.startswith(titleStart):
|
||||
playlist.delete()
|
||||
logger.info("...Deleted Playlist: {playlist.title} for '{user}'."
|
||||
.format(playlist=playlist, user=user))
|
||||
|
Loading…
Reference in New Issue
Block a user