added description overwrite and suffix support

This commit is contained in:
aj 2019-08-19 00:52:02 +01:00
parent 04840b3cd5
commit 3c50bf7a5a

View File

@ -119,13 +119,16 @@ class PlaylistEngine:
logger.error('error executing')
return None
def change_description(self, playlistparts, playlist_id, suffix=None):
def change_description(self, playlistparts, playlist_id, overwrite=None, suffix=None):
if suffix:
string = ' / '.join(playlistparts) + f' - {str(suffix)}'
if overwrite:
string = overwrite
else:
string = ' / '.join(playlistparts)
if suffix:
string += f' - {str(suffix)}'
resp = self.net.change_playlist_details(playlist_id, description=string)
if resp:
return resp