Merge branch '2.3.x' into 2.3.x-saas
This commit is contained in:
commit
1c80701488
10 changed files with 27 additions and 24 deletions
|
@ -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
|
||||
|
|
|
@ -88,7 +88,6 @@ try:
|
|||
#copy monit files
|
||||
shutil.copy('%s/../../monit/monit-airtime-generic.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
subprocess.call('sed -i "s/\$admin_pass/%s/g" /etc/monit/conf.d/monit-airtime-generic.cfg' % get_rand_string(), shell=True)
|
||||
shutil.copy('%s/../../monit/monit-airtime-rabbitmq-server.cfg'%current_script_dir, '/etc/monit/conf.d/')
|
||||
|
||||
monit_version = get_monit_version()
|
||||
if version_compare(monit_version, "5.3.0") >= 0:
|
||||
|
|
|
@ -49,7 +49,6 @@ try:
|
|||
remove_file("/etc/monit/conf.d/monit-airtime-playout.cfg")
|
||||
remove_file("/etc/monit/conf.d/monit-airtime-liquidsoap.cfg")
|
||||
remove_file("/etc/monit/conf.d/monit-airtime-generic.cfg")
|
||||
remove_file("/etc/monit/conf.d/monit-airtime-rabbitmq-server.cfg")
|
||||
|
||||
except Exception, e:
|
||||
print e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue