diff --git a/airtime_mvc/application/forms/StreamSettingSubForm.php b/airtime_mvc/application/forms/StreamSettingSubForm.php
index a520b8cec..bb0862794 100644
--- a/airtime_mvc/application/forms/StreamSettingSubForm.php
+++ b/airtime_mvc/application/forms/StreamSettingSubForm.php
@@ -136,8 +136,17 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{
$url->setAttrib('alt', 'url');
$this->addElement($url);
+ $name = new Zend_Form_Element_Text('name');
+ $name->setLabel("Name")
+ ->setValue(isset($setting[$prefix.'_name'])?$setting[$prefix.'_name']:"")
+ ->setDecorators(array('ViewHelper'));
+ if($disable_all){
+ $name->setAttrib("disabled", "disabled");
+ }
+ $this->addElement($name);
+
$description = new Zend_Form_Element_Text('description');
- $description->setLabel("Name/Description")
+ $description->setLabel("Description")
->setValue(isset($setting[$prefix.'_description'])?$setting[$prefix.'_description']:"")
->setDecorators(array('ViewHelper'));
if($disable_all){
diff --git a/airtime_mvc/application/models/StreamSetting.php b/airtime_mvc/application/models/StreamSetting.php
index d49bbd59a..b9dd16ac7 100644
--- a/airtime_mvc/application/models/StreamSetting.php
+++ b/airtime_mvc/application/models/StreamSetting.php
@@ -153,7 +153,7 @@ class Application_Model_StreamSetting {
*/
public static function setStreamSetting($data)
{
- $con = Propel::getConnection();
+ $con = Propel::getConnection();
foreach ($data as $key=>$d) {
if ($key == "output_sound_device" || $key == "icecast_vorbis_metadata") {
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 f61c06117..0f746d4c3 100644
--- a/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml
+++ b/airtime_mvc/application/views/scripts/form/stream-setting-form.phtml
@@ -98,6 +98,19 @@
The following info will be displayed to listeners in their media player:
+
+
+
+
+ element->getElement('name')?>
+ element->getElement('name')->hasErrors()) : ?>
+
+ element->getElement('name')->getMessages() as $error): ?>
+
+
+
+
+
diff --git a/airtime_mvc/build/sql/defaultdata.sql b/airtime_mvc/build/sql/defaultdata.sql
index c7b7a105d..cb390b7a3 100644
--- a/airtime_mvc/build/sql/defaultdata.sql
+++ b/airtime_mvc/build/sql/defaultdata.sql
@@ -1,5 +1,11 @@
INSERT INTO cc_subjs ("login", "type", "pass") VALUES ('admin', 'A', md5('admin'));
+-- added in 2.2
+INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_name', 'Airtime!', 'string');
+INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s2_name', '', 'string');
+INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s3_name', '', 'string');
+-- end of added in 2.2
+
-- added in 2.1
INSERT INTO cc_pref("keystr", "valstr") VALUES('scheduled_play_switch', 'on');
diff --git a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq b/python_apps/pypo/liquidsoap_scripts/ls_lib.liq
index cf8456696..4a0ef34e1 100644
--- a/python_apps/pypo/liquidsoap_scripts/ls_lib.liq
+++ b/python_apps/pypo/liquidsoap_scripts/ls_lib.liq
@@ -62,7 +62,7 @@ def to_live(old,new) =
end
-def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, description, genre, user, s, stream, connected) =
+def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, description, genre, user, s, stream, connected, name) =
def on_error(msg)
connected := "false"
system("/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --error='#{msg}' --stream-id=#{stream} --time=#{!time} &")
@@ -89,7 +89,8 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de
genre = genre,
user = !user_ref,
on_error = on_error,
- on_connect = on_connect)
+ on_connect = on_connect,
+ name = name)
if type == "mp3" then
if bitrate == 24 then
ignore(output(%mp3(bitrate = 24),s))
diff --git a/python_apps/pypo/liquidsoap_scripts/ls_script.liq b/python_apps/pypo/liquidsoap_scripts/ls_script.liq
index efbd221de..08d94ad0f 100644
--- a/python_apps/pypo/liquidsoap_scripts/ls_script.liq
+++ b/python_apps/pypo/liquidsoap_scripts/ls_script.liq
@@ -258,7 +258,7 @@ if s1_enable == true then
s1_namespace := s1_mount
end
server.register(namespace=!s1_namespace, "connected", fun (s) -> begin !s1_connected end)
- output_to(s1_output, s1_type, s1_bitrate, s1_host, s1_port, s1_pass, s1_mount, s1_url, s1_description, s1_genre, s1_user, s, "1", s1_connected)
+ output_to(s1_output, s1_type, s1_bitrate, s1_host, s1_port, s1_pass, s1_mount, s1_url, s1_description, s1_genre, s1_user, s, "1", s1_connected, s1_name)
end
if s2_enable == true then
@@ -268,7 +268,7 @@ if s2_enable == true then
s2_namespace := s2_mount
end
server.register(namespace=!s2_namespace, "connected", fun (s) -> begin !s2_connected end)
- output_to(s2_output, s2_type, s2_bitrate, s2_host, s2_port, s2_pass, s2_mount, s2_url, s2_description, s2_genre, s2_user, s, "2", s2_connected)
+ output_to(s2_output, s2_type, s2_bitrate, s2_host, s2_port, s2_pass, s2_mount, s2_url, s2_description, s2_genre, s2_user, s, "2", s2_connected, s2_name)
end
@@ -279,7 +279,7 @@ if s3_enable == true then
s3_namespace := s3_mount
end
server.register(namespace=!s3_namespace, "connected", fun (s) -> begin !s3_connected end)
- output_to(s3_output, s3_type, s3_bitrate, s3_host, s3_port, s3_pass, s3_mount, s3_url, s3_description, s3_genre, s3_user, s, "3", s3_connected)
+ output_to(s3_output, s3_type, s3_bitrate, s3_host, s3_port, s3_pass, s3_mount, s3_url, s3_description, s3_genre, s3_user, s, "3", s3_connected, s3_name)
end
ignore(output.dummy(blank()))