[1] update details of synced playlists

pull/943/head
meisnate12 3 years ago
parent 6524b7b274
commit d7c99be137

@ -1 +1 @@
1.17.1 1.17.1-develop1

@ -183,6 +183,7 @@ class CollectionBuilder:
self.library = library self.library = library
self.libraries = [] self.libraries = []
self.playlist = library is None self.playlist = library is None
self.playlist_summary = None
self.overlay = overlay self.overlay = overlay
methods = {m.lower(): m for m in self.data} methods = {m.lower(): m for m in self.data}
if self.playlist: if self.playlist:
@ -2436,7 +2437,9 @@ class CollectionBuilder:
else: summary = None else: summary = None
if self.playlist: if self.playlist:
if summary and str(summary[1]) != str(self.obj.summary): if summary:
self.playlist_summary = summary
if str(summary[1]) != str(self.obj.summary):
try: try:
self.obj.edit(summary=str(summary[1])) self.obj.edit(summary=str(summary[1]))
logger.info(f"Summary ({summary[0]}) | {summary[1]:<25}") logger.info(f"Summary ({summary[0]}) | {summary[1]:<25}")
@ -2634,7 +2637,14 @@ class CollectionBuilder:
self.library.delete_user_playlist(self.obj.title, user) self.library.delete_user_playlist(self.obj.title, user)
except NotFound: except NotFound:
pass pass
self.obj.copyToUser(user) new_playlist = self.obj.copyToUser(user)
if self.collection_poster:
self.library._upload_image(new_playlist, self.collection_poster)
if self.collection_background:
self.library._upload_image(new_playlist, self.collection_background)
if self.playlist_summary:
new_playlist.edit(summary=self.playlist_summary)
logger.info(f"Playlist: {self.name} synced to {user}") logger.info(f"Playlist: {self.name} synced to {user}")
def send_notifications(self, playlist=False): def send_notifications(self, playlist=False):

Loading…
Cancel
Save