mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Fix error on conversion in python3
This commit is contained in:
@@ -26,8 +26,8 @@ def compare(file, metadata):
|
|||||||
return already_tagged
|
return already_tagged
|
||||||
|
|
||||||
def embed(music_file, meta_tags, output_ext):
|
def embed(music_file, meta_tags, output_ext):
|
||||||
if sys.version_info < (3, 0):
|
if sys.version_info < (3, 0):
|
||||||
music_file = music_file.encode('utf-8')
|
music_file = misc.fix_encoding(music_file)
|
||||||
if meta_tags is None:
|
if meta_tags is None:
|
||||||
print('Could not find meta-tags')
|
print('Could not find meta-tags')
|
||||||
elif output_ext == '.m4a':
|
elif output_ext == '.m4a':
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ def download_song(content):
|
|||||||
def convert_song(music_file):
|
def convert_song(music_file):
|
||||||
# skip conversion if input_ext == output_ext
|
# skip conversion if input_ext == output_ext
|
||||||
if not args.input_ext == args.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:])
|
print('Converting ' + music_file + args.input_ext + ' to ' + args.output_ext[1:])
|
||||||
if args.avconv:
|
if args.avconv:
|
||||||
convert_with_avconv(music_file)
|
convert_with_avconv(music_file)
|
||||||
|
|||||||
Reference in New Issue
Block a user