From 9e2a5751d32a11fd6e11116ca0c2284ebd69444c Mon Sep 17 00:00:00 2001 From: Ritiek Date: Sun, 25 Jun 2017 20:51:59 +0530 Subject: [PATCH 1/2] Fix error on conversion in python3 --- core/metadata.py | 4 ++-- spotdl.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/metadata.py b/core/metadata.py index 9736285..5e2a19f 100755 --- a/core/metadata.py +++ b/core/metadata.py @@ -26,8 +26,8 @@ def compare(file, metadata): return already_tagged def embed(music_file, meta_tags, output_ext): - if sys.version_info < (3, 0): - music_file = music_file.encode('utf-8') + if sys.version_info < (3, 0): + music_file = misc.fix_encoding(music_file) if meta_tags is None: print('Could not find meta-tags') elif output_ext == '.m4a': diff --git a/spotdl.py b/spotdl.py index 03d4d52..fa9b31a 100755 --- a/spotdl.py +++ b/spotdl.py @@ -161,7 +161,7 @@ def download_song(content): def convert_song(music_file): # skip conversion if input_ext == output_ext if not args.input_ext == args.output_ext: - music_file = music_file.encode('utf-8') + music_file = misc.fix_encoding(music_file) print('Converting ' + music_file + args.input_ext + ' to ' + args.output_ext[1:]) if args.avconv: convert_with_avconv(music_file) From a31426886b890b3fc0048cc8bcef67a2e2e2029e Mon Sep 17 00:00:00 2001 From: Ritiek Date: Sun, 25 Jun 2017 20:55:07 +0530 Subject: [PATCH 2/2] Fix error on conversion in python3 --- core/metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/metadata.py b/core/metadata.py index 5e2a19f..6549755 100755 --- a/core/metadata.py +++ b/core/metadata.py @@ -27,7 +27,7 @@ def compare(file, metadata): def embed(music_file, meta_tags, output_ext): if sys.version_info < (3, 0): - music_file = misc.fix_encoding(music_file) + music_file = misc.encode('utf-8') if meta_tags is None: print('Could not find meta-tags') elif output_ext == '.m4a':