mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Merge pull request #311 from ritiek/fix-song-exist-check
Fix check for song with same name
This commit is contained in:
@@ -28,8 +28,8 @@ def check_exists(music_file, raw_song, meta_tags):
|
|||||||
if song.endswith('.temp'):
|
if song.endswith('.temp'):
|
||||||
os.remove(os.path.join(const.args.folder, song))
|
os.remove(os.path.join(const.args.folder, song))
|
||||||
continue
|
continue
|
||||||
# check if any song with similar name is already present in the given folder
|
# check if a song with the same name is already present in the given folder
|
||||||
if song.startswith(music_file):
|
if song == os.path.splitext(music_file)[0]:
|
||||||
log.debug('Found an already existing song: "{}"'.format(song))
|
log.debug('Found an already existing song: "{}"'.format(song))
|
||||||
if internals.is_spotify(raw_song):
|
if internals.is_spotify(raw_song):
|
||||||
# check if the already downloaded song has correct metadata
|
# check if the already downloaded song has correct metadata
|
||||||
|
|||||||
Reference in New Issue
Block a user