From a73612afd2d4204b3a488a719d9ebc58a48f36e8 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 19 Aug 2011 16:35:23 -0400 Subject: [PATCH] CC-2607: Ability to adjust stream bitrate,type,etc from the UI interface - Modified "Descriptioin" to "Name/Description" - mount point is not append with extension anymore - fix on auto generated stream url - name is used in shoutcast --- .../forms/StreamSettingSubForm.php | 7 +-- .../application/models/StreamSetting.php | 3 - .../scripts/form/stream-setting-form.phtml | 61 +++++++++---------- airtime_mvc/build/sql/defaultdata.sql | 2 +- .../js/airtime/preferences/streamsetting.js | 54 +++++++++++----- .../pypo/liquidsoap_scripts/ls_lib.liq | 3 +- 6 files changed, 73 insertions(+), 57 deletions(-) diff --git a/airtime_mvc/application/forms/StreamSettingSubForm.php b/airtime_mvc/application/forms/StreamSettingSubForm.php index 2a5ff94a3..0d5a3473f 100644 --- a/airtime_mvc/application/forms/StreamSettingSubForm.php +++ b/airtime_mvc/application/forms/StreamSettingSubForm.php @@ -94,23 +94,20 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{ $this->addElement($url); $description = new Zend_Form_Element_Text('description'); - $description->setLabel("Description") + $description->setLabel("Name/Description") ->setValue($setting[$prefix.'_description']) ->setDecorators(array('ViewHelper')); $this->addElement($description); $mount_info = explode('.',$setting[$prefix.'_mount']); $mount = new Zend_Form_Element_Text('mount'); - $mount->class = "with-info"; $mount->setLabel("Mount Point") ->setValue($mount_info[0]) ->setDecorators(array('ViewHelper')); $this->addElement($mount); - $stream_url_value = "http://".$setting[$prefix.'_host'].":".$setting[$prefix.'_port']."/".$mount_info[0].".".$setting[$prefix.'_type']; - $this->setDecorators(array( - array('ViewScript', array('viewScript' => 'form/stream-setting-form.phtml', "stream_number"=>$stream_number, "stream_url"=>$stream_url_value)) + array('ViewScript', array('viewScript' => 'form/stream-setting-form.phtml', "stream_number"=>$stream_number)) )); } diff --git a/airtime_mvc/application/models/StreamSetting.php b/airtime_mvc/application/models/StreamSetting.php index e6228931d..8233388a3 100644 --- a/airtime_mvc/application/models/StreamSetting.php +++ b/airtime_mvc/application/models/StreamSetting.php @@ -31,9 +31,6 @@ class Application_Model_StreamSetting { $v = 'disabled'; } } - if( $k == 'mount'){ - $v = $d['mount'].".".$d['type']; - } $sql = "UPDATE cc_stream_setting SET value='$v' WHERE keyname='$keyname'"; $CC_DBC->query($sql); } diff --git a/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml b/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml index 74c904a91..d729cd27e 100644 --- a/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml +++ b/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml @@ -76,39 +76,9 @@ -
The following info will be displayed to listeners in their media player:
- -
- -
-
- element->getElement('genre')?> - element->getElement('genre')->hasErrors()) : ?> - - -
- -
- -
-
- element->getElement('url')?> - element->getElement('url')->hasErrors()) : ?> - - -
-
@@ -122,12 +92,37 @@ - +
+ +
+
+ element->getElement('url')?> + element->getElement('url')->hasErrors()) : ?> + + +
+
+ +
+
+ element->getElement('genre')?> + element->getElement('genre')->hasErrors()) : ?> + + +
- element->getElement('mount')?>.element->getElement('type')->getValue()?> + element->getElement('mount')?> element->getElement('mount')->hasErrors()) : ?>