From 54258d712693f2ebf2cacdf841c175eef1dc1525 Mon Sep 17 00:00:00 2001 From: aj Date: Mon, 19 Aug 2019 00:52:02 +0100 Subject: [PATCH] added description overwrite and suffix support --- spotify/tasks/run_user_playlist.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spotify/tasks/run_user_playlist.py b/spotify/tasks/run_user_playlist.py index 20e3324..2a0dd73 100644 --- a/spotify/tasks/run_user_playlist.py +++ b/spotify/tasks/run_user_playlist.py @@ -84,7 +84,14 @@ def run_user_playlist(username, playlist_name): recommendation_limit=int(playlist_dict['recommendation_sample'])) engine.execute_playlist(tracks, playlist_dict['playlist_id']) - engine.change_description(sorted(submit_parts), playlist_dict['playlist_id']) + + overwrite = playlist_dict.get('description_overwrite', None) + suffix = playlist_dict.get('description_suffix', None) + + engine.change_description(sorted(submit_parts), + playlist_dict['playlist_id'], + overwrite=overwrite, + suffix=suffix) else: logger.critical(f'multiple/no playlists found ({username}/{playlist_name})')