From 862affb8050c3fc4cb13f6378be9e622c6507caa Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 26 Jul 2018 19:45:23 +0200 Subject: [PATCH] Fix check for song with same name --- spotdl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spotdl.py b/spotdl.py index b52cea0..cadfce5 100755 --- a/spotdl.py +++ b/spotdl.py @@ -28,8 +28,8 @@ def check_exists(music_file, raw_song, meta_tags): if song.endswith('.temp'): os.remove(os.path.join(const.args.folder, song)) continue - # check if any song with similar name is already present in the given folder - if song.startswith(music_file): + # check if a song with the same name is already present in the given folder + if song == os.path.splitext(music_file)[0]: log.debug('Found an already existing song: "{}"'.format(song)) if internals.is_spotify(raw_song): # check if the already downloaded song has correct metadata