From 8f36539ab7115c6c8a8fad8bbdf5c206118bf1ad Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Dec 2025 06:34:11 +0100 Subject: [PATCH] Prepare V0.2 --- zotify/track.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/zotify/track.py b/zotify/track.py index 4cd2d36..42ed7e8 100644 --- a/zotify/track.py +++ b/zotify/track.py @@ -285,11 +285,16 @@ def download_track(mode: str, track_id: str, extra_keys=None, disable_progressba # a song with the same name is installed if not check_id and check_name: - c = len([file for file in Path(filedir).iterdir() if re.search(f'^{filename}_', str(file))]) + 1 - - #SpotiClub : Fix phantom files when colliding with existing names (-_.mp3) stem = PurePath(filename).stem ext = PurePath(filename).suffix + base_prefix = str(PurePath(filedir).joinpath(stem)) + c = len([ + file + for file in Path(filedir).iterdir() + if str(file).startswith(base_prefix + "_") + ]) + 1 + + # SpotiClub: Fix phantom files when colliding with existing names (-_.mp3) filename = PurePath(filedir).joinpath(f'{stem}_{c}{ext}') @@ -355,6 +360,7 @@ def download_track(mode: str, track_id: str, extra_keys=None, disable_progressba global _ogg_delay_applied_once if mode in ('album', 'playlist', 'extplaylist'): if _ogg_delay_applied_once: + # Spammy log # Printer.print(PrintChannel.PROGRESS_INFO, '\n## OGG File : Waiting 5 seconds before resuming... ##') time.sleep(5) else: