CC-4978: Media Monitor: importing file slowly
-disable silan on file import -silan will need to be done manually for now using airtime-silan
This commit is contained in:
parent
00d577fd5b
commit
c747b6ad47
|
@ -171,17 +171,16 @@ def normalize_mutagen(path):
|
|||
md['path'] = normpath(path)
|
||||
|
||||
# silence detect(set default cue in and out)
|
||||
try:
|
||||
command = ['silan', "-b", '-f', 'JSON', md['path']]
|
||||
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||
out = proc.communicate()[0].strip('\r\n')
|
||||
#try:
|
||||
#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'][0][1]
|
||||
except Exception:
|
||||
logger = logging.getLogger()
|
||||
logger.info('silan is missing')
|
||||
#info = json.loads(out)
|
||||
#md['cuein'] = info['sound'][0][0]
|
||||
#md['cueout'] = info['sound'][0][1]
|
||||
#except Exception:
|
||||
#self.logger.debug('silan is missing')
|
||||
|
||||
if 'title' not in md: md['title'] = u''
|
||||
return md
|
||||
|
|
Loading…
Reference in New Issue