potential future optimization by using -b silan option

-in the future this -b should be quicker for silan
This commit is contained in:
Martin Konecny 2013-02-26 13:33:56 -05:00
parent 1e1d291124
commit 0c88949eb2

View file

@ -172,13 +172,13 @@ def normalize_mutagen(path):
# silence detect(set default cue in and out)
try:
command = ['silan', '-f', 'JSON', md['path']]
command = ['silan', "-b", '-f', 'JSON', md['path']]
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
out = proc.communicate()[0].strip('\r\n')
info = json.loads(out)
md['cuein'] = info['sound'][0][0]
md['cueout'] = info['sound'][-1][1]
md['cueout'] = info['sound'][0][1]
except Exception:
logger = logging.getLogger()
logger.info('silan is missing')