diff --git a/airtime_mvc/application/views/scripts/preference/stream-setting.phtml b/airtime_mvc/application/views/scripts/preference/stream-setting.phtml index 2a583736d..c09d33c51 100644 --- a/airtime_mvc/application/views/scripts/preference/stream-setting.phtml +++ b/airtime_mvc/application/views/scripts/preference/stream-setting.phtml @@ -80,7 +80,7 @@ -
+ diff --git a/airtime_mvc/public/js/airtime/preferences/streamsetting.js b/airtime_mvc/public/js/airtime/preferences/streamsetting.js index 2bfcdf710..28dd07db1 100644 --- a/airtime_mvc/public/js/airtime/preferences/streamsetting.js +++ b/airtime_mvc/public/js/airtime/preferences/streamsetting.js @@ -231,7 +231,7 @@ function setupEventListeners() { } }) - $('.toggle legend').live('click',function() { + $('.toggle legend').click(function() { $(this).parent().toggleClass('closed'); return false; }); @@ -375,21 +375,6 @@ function setupEventListeners() { at: "right center" }, }) - - $('#stream_save').live('click', function(){ - var confirm_pypo_restart_text = $.i18n._("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted."); - if (confirm(confirm_pypo_restart_text)) { - var data = $('#stream_form').serialize(); - var url = baseUrl+'/Preference/stream-setting'; - - $.post(url, {format:"json", data: data}, function(data){ - var json = $.parseJSON(data); - $('#content').empty().append(json.html); - setupEventListeners(); - setSliderForReplayGain(); - }); - } - }); } function setSliderForReplayGain(){ @@ -409,5 +394,20 @@ function setSliderForReplayGain(){ $(document).ready(function() { setupEventListeners(); setSliderForReplayGain(); + + $('#stream_save').live('click', function(){ + var confirm_pypo_restart_text = $.i18n._("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted."); + if (confirm(confirm_pypo_restart_text)) { + var data = $('#stream_form').serialize(); + var url = baseUrl+'/Preference/stream-setting'; + + $.post(url, {format:"json", data: data}, function(data){ + var json = $.parseJSON(data); + $('#content').empty().append(json.html); + setupEventListeners(); + setSliderForReplayGain(); + }); + } + }); }); diff --git a/python_apps/media-monitor2/media/metadata/process.py b/python_apps/media-monitor2/media/metadata/process.py index 9b5729624..ccaa1f41c 100644 --- a/python_apps/media-monitor2/media/metadata/process.py +++ b/python_apps/media-monitor2/media/metadata/process.py @@ -9,6 +9,7 @@ from collections import namedtuple import mutagen import subprocess import json +import logging class FakeMutagen(dict): """ @@ -168,7 +169,7 @@ def normalize_mutagen(path): md['sample_rate'] = getattr(m.info, 'sample_rate', 0) md['mime'] = m.mime[0] if len(m.mime) > 0 else u'' md['path'] = normpath(path) - + # silence detect(set default queue in and out) try: command = ['silan', '-f', 'JSON', md['path']] @@ -178,8 +179,9 @@ def normalize_mutagen(path): md['cuein'] = info['sound'][0][0] md['cueout'] = info['sound'][-1][1] except Exception: - raise - + logger = logging.getLogger() + logger.info('silan is missing') + if 'title' not in md: md['title'] = u'' return md diff --git a/python_apps/pypo/pypofetch.py b/python_apps/pypo/pypofetch.py index 720b1eef4..2641b5c61 100644 --- a/python_apps/pypo/pypofetch.py +++ b/python_apps/pypo/pypofetch.py @@ -296,7 +296,7 @@ class PypoFetch(Thread): dump, stream = s[u'keyname'].split('_', 1) state_change_restart[stream] = False # This is the case where restart is required no matter what - if (existing[s[u'keyname']] != s[u'value']): + if (existing[s[u'keyname']] != str(s[u'value'])): self.logger.info("'Need-to-restart' state detected for %s...", s[u'keyname']) restart = True; elif "master_live_stream_port" in s[u'keyname'] or "master_live_stream_mp" in s[u'keyname'] or "dj_live_stream_port" in s[u'keyname'] or "dj_live_stream_mp" in s[u'keyname']: