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:
Martin Konecny 2013-03-04 16:00:14 -05:00
parent 00d577fd5b
commit c747b6ad47
1 changed files with 9 additions and 10 deletions

View File

@ -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