CC-3412: Icecast stream name not defined
-done
This commit is contained in:
parent
8b2353ede0
commit
f3b925daa2
6 changed files with 36 additions and 7 deletions
|
@ -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){
|
||||
|
|
|
@ -98,6 +98,19 @@
|
|||
<dt class="block-display info-block">
|
||||
The following info will be displayed to listeners in their media player:
|
||||
</dt>
|
||||
<dt id="stationName-label">
|
||||
<label for="stationName"><?php echo $this->element->getElement('name')->getLabel()?> :</label>
|
||||
</dt>
|
||||
<dd id="stationName-element" class="clearfix">
|
||||
<?php echo $this->element->getElement('name')?>
|
||||
<?php if($this->element->getElement('name')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('name')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="stationDescription-label">
|
||||
<label for="stationDescription"><?php echo $this->element->getElement('description')->getLabel()?> :</label>
|
||||
</dt>
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue