potential future optimization by using -b silan option
-in the future this -b should be quicker for silan
This commit is contained in:
parent
1e1d291124
commit
0c88949eb2
1 changed files with 2 additions and 2 deletions
|
@ -172,13 +172,13 @@ def normalize_mutagen(path):
|
||||||
|
|
||||||
# silence detect(set default cue in and out)
|
# silence detect(set default cue in and out)
|
||||||
try:
|
try:
|
||||||
command = ['silan', '-f', 'JSON', md['path']]
|
command = ['silan', "-b", '-f', 'JSON', md['path']]
|
||||||
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
|
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||||
out = proc.communicate()[0].strip('\r\n')
|
out = proc.communicate()[0].strip('\r\n')
|
||||||
|
|
||||||
info = json.loads(out)
|
info = json.loads(out)
|
||||||
md['cuein'] = info['sound'][0][0]
|
md['cuein'] = info['sound'][0][0]
|
||||||
md['cueout'] = info['sound'][-1][1]
|
md['cueout'] = info['sound'][0][1]
|
||||||
except Exception:
|
except Exception:
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
logger.info('silan is missing')
|
logger.info('silan is missing')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue