From b9e17c96efdf21aa885c9d61c9f98fa02cf16ec0 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Mon, 10 Dec 2012 06:49:17 -0500 Subject: [PATCH] Possible fix for encoder commands not working (on windows only?) when there are spaces in the path to encoder --- headphones/music_encoder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/headphones/music_encoder.py b/headphones/music_encoder.py index 1f03aca7..916c0335 100644 --- a/headphones/music_encoder.py +++ b/headphones/music_encoder.py @@ -156,7 +156,7 @@ def command(encoder,musicSource,musicDest,albumPath): if XLD: xldDestDir = os.path.split(musicDest)[0] - cmd = encoder + cmd = '"' + encoder + '"' cmd = cmd + ' "' + musicSource + '"' cmd = cmd + ' --profile' cmd = cmd + ' "' + xldProfile + '"' @@ -165,7 +165,7 @@ def command(encoder,musicSource,musicDest,albumPath): elif headphones.ENCODER == 'lame': if headphones.ADVANCEDENCODER =='': - cmd=encoder + ' -h' + cmd='"' + encoder + '"' + ' -h' if headphones.ENCODERVBRCBR=='cbr': cmd=cmd+ ' --resample ' + str(headphones.SAMPLINGFREQUENCY) + ' -b ' + str(headphones.BITRATE) elif headphones.ENCODERVBRCBR=='vbr': @@ -177,7 +177,7 @@ def command(encoder,musicSource,musicDest,albumPath): cmd=cmd+ ' "' + musicDest +'"' elif headphones.ENCODER == 'ffmpeg': - cmd=encoder+ ' -i' + cmd='"' + encoder + '"' + ' -i' cmd=cmd+ ' "' + musicSource + '"' if headphones.ADVANCEDENCODER =='': if headphones.ENCODEROUTPUTFORMAT=='ogg':