Fix to missing waveform gen

This commit is contained in:
fergalmoran
2013-04-22 09:36:24 +01:00
parent ae41324fe1
commit d2ec6cf889
2 changed files with 3 additions and 2 deletions

View File

@@ -16,7 +16,8 @@ def generate_waveform(input_file, output_file):
print "Starting waveform generation" print "Starting waveform generation"
#print "%s -m -l -i %s -o -b 000000 %s" % (settings.DSS_WAVE_PATH, working_file, output_file) #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]) #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): if os.path.isfile(output_file):
os.remove(working_file) os.remove(working_file)
print "Generated waveform" print "Generated waveform"

View File

@@ -84,7 +84,7 @@ class Mix(_BaseModel):
def get_waveform_url(self): 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_root = localsettings.WAVEFORM_URL if hasattr(localsettings,
'WAVEFORM_URL') else "%swaveforms" % settings.MEDIA_URL 'WAVEFORM_URL') else "%swaveforms" % settings.MEDIA_URL