From 086dc846bd89aad1db9c250a83996bfb43d31735 Mon Sep 17 00:00:00 2001 From: Ritiek Date: Sun, 18 Jun 2017 03:27:36 +0530 Subject: [PATCH] Bug fix change tag to tags --- core/metadata.py | 2 +- spotdl.py | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/core/metadata.py b/core/metadata.py index e32d0a7..db36e81 100644 --- a/core/metadata.py +++ b/core/metadata.py @@ -16,7 +16,7 @@ def compare(file, metadata): # fetch track title metadata already_tagged = audiofile['title'][0] == metadata['name'] elif file.endswith('.m4a'): - tag = {'title': '\xa9nam'} + tags = {'title': '\xa9nam'} audiofile = MP4('Music/' + file) # fetch track title metadata already_tagged = audiofile[tags['title']] == metadata['name'] diff --git a/spotdl.py b/spotdl.py index 68e1257..4f850fe 100644 --- a/spotdl.py +++ b/spotdl.py @@ -220,17 +220,18 @@ def convert_with_FFmpeg(music_file): print('Unknown formats. Unable to convert.', args.input_ext, args.output_ext) return - #command = (ffmpeg_pre + - # '-i "Music/' + music_file + args.input_ext + '"' + - # ffmpeg_params + - # '"Music/' + music_file + args.output_ext + '"').split(' ') + command = (ffmpeg_pre + + '-i "Music/' + music_file + args.input_ext + '"' + + ffmpeg_params + + '"Music/' + music_file + args.output_ext + '"').split(' ') commandos = (ffmpeg_pre + '-i "Music/' + music_file + args.input_ext + '" ' + ffmpeg_params + '"Music/' + music_file + args.output_ext + '" ') - #print(command) - #print(commandos) + print(command) + print(commandos) + exit() os.system(commandos) #subprocess.call(command) @@ -337,6 +338,7 @@ if __name__ == '__main__': os.makedirs("Music") # token is mandatory when using Spotify's API + # https://developer.spotify.com/news-stories/2017/01/27/removing-unauthenticated-calls-to-the-web-api/ token = misc.generate_token() spotify = spotipy.Spotify(auth=token)