Merge branch 'main' into 'main'

Fix filename when a duplicate filename is found but id is not found in .song_ids

See merge request team-zotify/zotify!10
This commit is contained in:
Abdullah Mallik 2024-02-11 08:27:38 +00:00
commit 517eeca9c8
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ def download_track(mode: str, track_id: str, extra_keys=None, disable_progressba
if not check_id and check_name:
c = len([file for file in Path(filedir).iterdir() if re.search(f'^{filename}_', str(file))]) + 1
fname = PurePath(PurePath(filename).name).parent
fname = PurePath(PurePath(filename).name).stem
ext = PurePath(PurePath(filename).name).suffix
filename = PurePath(filedir).joinpath(f'{fname}_{c}{ext}')