Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into cc-5709-airtime-analyzer-cloud-storage-saas

This commit is contained in:
drigato 2015-01-07 14:17:02 -05:00
commit ad16683858
47 changed files with 81 additions and 1697 deletions

View file

@ -26,7 +26,7 @@ class CuePointAnalyzer(Analyzer):
'''
command = [CuePointAnalyzer.SILAN_EXECUTABLE, '-b', '-F', '0.99', '-f', 'JSON', filename]
try:
results_json = subprocess.check_output(command, stderr=subprocess.STDOUT)
results_json = subprocess.check_output(command, stderr=subprocess.STDOUT, close_fds=True)
silan_results = json.loads(results_json)
metadata['length_seconds'] = float(silan_results['file duration'])
# Conver the length into a formatted time string
@ -42,4 +42,4 @@ class CuePointAnalyzer(Analyzer):
except Exception as e:
logging.warn(e)
return metadata
return metadata

View file

@ -21,7 +21,7 @@ class PlayabilityAnalyzer(Analyzer):
'''
command = [PlayabilityAnalyzer.LIQUIDSOAP_EXECUTABLE, '-v', '-c', "output.dummy(audio_to_stereo(single('%s')))" % filename]
try:
subprocess.check_output(command, stderr=subprocess.STDOUT)
subprocess.check_output(command, stderr=subprocess.STDOUT, close_fds=True)
except OSError as e: # liquidsoap was not found
logging.warn("Failed to run: %s - %s. %s" % (command[0], e.strerror, "Do you have liquidsoap installed?"))

View file

@ -19,7 +19,7 @@ class ReplayGainAnalyzer(Analyzer):
'''
command = [ReplayGainAnalyzer.REPLAYGAIN_EXECUTABLE, '-d', filename]
try:
results = subprocess.check_output(command, stderr=subprocess.STDOUT)
results = subprocess.check_output(command, stderr=subprocess.STDOUT, close_fds=True)
filename_token = "%s: " % filename
rg_pos = results.find(filename_token, results.find("Calculating Replay Gain information")) + len(filename_token)
db_pos = results.find(" dB", rg_pos)
@ -33,4 +33,4 @@ class ReplayGainAnalyzer(Analyzer):
except Exception as e:
logging.warn(e)
return metadata
return metadata