From f5b6d85406e66959f5324053c04d2cc10b40f204 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 3 Jan 2013 14:30:19 -0500 Subject: [PATCH 1/5] CC-3018: Automatically strip out silence from audio tracks - adding logging --- python_apps/media-monitor2/media/metadata/process.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python_apps/media-monitor2/media/metadata/process.py b/python_apps/media-monitor2/media/metadata/process.py index 9b5729624..38e036175 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): """ @@ -178,7 +179,8 @@ 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 From a05259bd8f5a955d8d02aa17a02cc02531381fbc Mon Sep 17 00:00:00 2001 From: James Date: Thu, 3 Jan 2013 14:42:12 -0500 Subject: [PATCH 2/5] CC-4771: System -> Streams: It will restart liquidsoap every time when I click "Save" button without changing anything - fixed --- python_apps/pypo/pypofetch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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']: From 0f4ddc904ff24746d797cc671813064ce7264660 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 3 Jan 2013 14:54:07 -0500 Subject: [PATCH 3/5] CC-4756: System -> Streams: "Addtional Options" is not expandable when connection error happens - fixed --- .../js/airtime/preferences/streamsetting.js | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) 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(); + }); + } + }); }); From 1f7e0ce042477afd6c6acb97bb336872f6c54757 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 3 Jan 2013 14:58:29 -0500 Subject: [PATCH 4/5] CC-4782: Replay Gain modifier adds horizontal scroll bar when set to +10dB - fixed --- .../application/views/scripts/preference/stream-setting.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ -
+
From 5df867d1428fa6b3babd118fc6d40d4dd1f4a0ae Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 3 Jan 2013 15:05:31 -0500 Subject: [PATCH 5/5] remove whitespace --- python_apps/media-monitor2/media/metadata/process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_apps/media-monitor2/media/metadata/process.py b/python_apps/media-monitor2/media/metadata/process.py index 38e036175..ccaa1f41c 100644 --- a/python_apps/media-monitor2/media/metadata/process.py +++ b/python_apps/media-monitor2/media/metadata/process.py @@ -169,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']] @@ -181,7 +181,7 @@ def normalize_mutagen(path): except Exception: logger = logging.getLogger() logger.info('silan is missing') - + if 'title' not in md: md['title'] = u'' return md