From 0c88949eb2bda13129baf102d3950afc64320201 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Tue, 26 Feb 2013 13:33:56 -0500 Subject: [PATCH] potential future optimization by using -b silan option -in the future this -b should be quicker for silan --- python_apps/media-monitor2/media/metadata/process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_apps/media-monitor2/media/metadata/process.py b/python_apps/media-monitor2/media/metadata/process.py index a9c251944..9128c0bec 100644 --- a/python_apps/media-monitor2/media/metadata/process.py +++ b/python_apps/media-monitor2/media/metadata/process.py @@ -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')