From 39e0e876d7d895aadbfade5cb14cfdcf82b43ec5 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Fri, 28 Feb 2025 11:47:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Fixed=20composer=20in?= =?UTF-8?q?=20metadata.=20Needs=20to=20be=20empty=20string.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/download.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index ce02e3b..b623c18 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -31,7 +31,13 @@ from tidal_dl_ng.constants import ( ) from tidal_dl_ng.helper.decryption import decrypt_file, decrypt_security_token from tidal_dl_ng.helper.exceptions import MediaMissing -from tidal_dl_ng.helper.path import check_file_exists, format_path_media, path_file_sanitize, url_to_filename +from tidal_dl_ng.helper.path import ( + check_file_exists, + format_path_media, + path_file_sanitize, + sanitize_filename, + url_to_filename, +) from tidal_dl_ng.helper.tidal import ( instantiate_media, items_results_all, @@ -654,7 +660,7 @@ class Download: track_replay_gain=media_stream.track_replay_gain, track_peak_amplitude=media_stream.track_peak_amplitude, url_share=track.share_url if track.share_url else "", - replay_gain_write=self.settings.data.metadata_replay_gain + replay_gain_write=self.settings.data.metadata_replay_gain, ) m.save() @@ -747,7 +753,7 @@ class Download: # For each dir, which contains tracks for dir_scoped in dirs_scoped: # Sanitize final playlist name to fit into OS boundaries. - path_playlist = dir_scoped / (PLAYLIST_PREFIX + name_list + PLAYLIST_EXTENSION) + path_playlist = dir_scoped / sanitize_filename(PLAYLIST_PREFIX + name_list + PLAYLIST_EXTENSION) path_playlist = pathlib.Path(path_file_sanitize(path_playlist, adapt=True)) self.fn_logger.debug(f"Playlist: Creating {path_playlist}")