[67] delete playlists when the server admin doesnt have the playlist

pull/1315/head
meisnate12 2 years ago
parent 07543cf9b0
commit 42c457fcc7

@ -1 +1 @@
1.18.3-develop66 1.18.3-develop67

@ -2927,8 +2927,9 @@ class CollectionBuilder:
self.config.Trakt.sync_list(self.sync_to_trakt_list, current_ids) self.config.Trakt.sync_list(self.sync_to_trakt_list, current_ids)
def delete(self): def delete(self):
title = self.obj.title if self.obj else self.name
if self.playlist: if self.playlist:
output = f"Deleting {self.Type} {self.obj.title}" output = f"Deleting {self.Type} {title}"
output += f"\n{self.Type} {'deleted' if self.obj else 'not found'} on {self.library.account.username}" output += f"\n{self.Type} {'deleted' if self.obj else 'not found'} on {self.library.account.username}"
elif self.obj: elif self.obj:
output = f"{self.Type} {self.obj.title} deleted" output = f"{self.Type} {self.obj.title} deleted"
@ -2943,7 +2944,7 @@ class CollectionBuilder:
if self.playlist and self.valid_users: if self.playlist and self.valid_users:
for user in self.valid_users: for user in self.valid_users:
try: try:
self.library.delete_user_playlist(self.obj.title, user) self.library.delete_user_playlist(title, user)
output += f"\nPlaylist deleted on User {user}" output += f"\nPlaylist deleted on User {user}"
except Failed: except Failed:
output += f"\nPlaylist not found on User {user}" output += f"\nPlaylist not found on User {user}"

Loading…
Cancel
Save