From d2ec6cf88993a07435fec4e60520b67e1501c511 Mon Sep 17 00:00:00 2001 From: fergalmoran Date: Mon, 22 Apr 2013 09:36:24 +0100 Subject: [PATCH] Fix to missing waveform gen --- core/utils/waveform.py | 3 ++- spa/models/Mix.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/utils/waveform.py b/core/utils/waveform.py index 636936f..94daeec 100644 --- a/core/utils/waveform.py +++ b/core/utils/waveform.py @@ -16,7 +16,8 @@ def generate_waveform(input_file, output_file): print "Starting waveform generation" #print "%s -m -l -i %s -o -b 000000 %s" % (settings.DSS_WAVE_PATH, working_file, output_file) #subprocess.call([settings.DSS_WAVE_PATH, "-t", "-m", "-l", "-i", working_file, "-o", output_file]) - ret = subprocess.call(["/usr/local/bin/wav2png", "--foreground-color", "00000000", "--background-color", "2e4562ff", "-w", "800", "-h", "120", "-o", output_file, working_file], stderr=subprocess.PIPE, stdout=subprocess.PIPE) + #ret = subprocess.call(["/usr/local/bin/wav2png", "--foreground-color", "00000000", "--background-color", "2e4562ff", "-w", "800", "-h", "120", "-o", output_file, working_file], stderr=subprocess.PIPE, stdout=subprocess.PIPE) + ret = subprocess.call(["/usr/local/bin/wav2png", "-w", "800", "-h", "120", "-o", output_file, working_file], stderr=subprocess.PIPE, stdout=subprocess.PIPE) if os.path.isfile(output_file): os.remove(working_file) print "Generated waveform" diff --git a/spa/models/Mix.py b/spa/models/Mix.py index 706e7ff..bd26b75 100644 --- a/spa/models/Mix.py +++ b/spa/models/Mix.py @@ -84,7 +84,7 @@ class Mix(_BaseModel): def get_waveform_url(self): - if self.waveform_generated and os.file.exists(self.get_waveform_path()): + if self.waveform_generated and os.path.exists(self.get_waveform_path()): waveform_root = localsettings.WAVEFORM_URL if hasattr(localsettings, 'WAVEFORM_URL') else "%swaveforms" % settings.MEDIA_URL