Merge branch '2.3.x' into 2.3.x-saas
This commit is contained in:
commit
92d0a6178e
3 changed files with 12 additions and 8 deletions
|
@ -58,7 +58,8 @@ class ReplayGainUpdater(Thread):
|
|||
total += 1
|
||||
|
||||
try:
|
||||
self.api_client.update_replay_gain_values(processed_data)
|
||||
if len(processed_data):
|
||||
self.api_client.update_replay_gain_values(processed_data)
|
||||
except Exception as e:
|
||||
self.logger.error(e)
|
||||
self.logger.debug(traceback.format_exc())
|
||||
|
|
|
@ -45,10 +45,13 @@ class SilanAnalyzer(Thread):
|
|||
command = ['nice', '-n', '19', 'silan', '-b', '-f', 'JSON', full_path]
|
||||
try:
|
||||
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||
out = proc.communicate()[0].strip('\r\n')
|
||||
info = json.loads(out)
|
||||
data['cuein'] = str('{0:f}'.format(info['sound'][0][0]))
|
||||
data['cueout'] = str('{0:f}'.format(info['sound'][-1][1]))
|
||||
comm = proc.communicate()
|
||||
if len(comm):
|
||||
out = comm[0].strip('\r\n')
|
||||
info = json.loads(out)
|
||||
if len(info['sound']) >= 2:
|
||||
data['cuein'] = str('{0:f}'.format(info['sound'][0][0]))
|
||||
data['cueout'] = str('{0:f}'.format(info['sound'][-1][1]))
|
||||
except Exception, e:
|
||||
self.logger.error(str(command))
|
||||
self.logger.error(e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue