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
This commit is contained in:
parent
f2f599f723
commit
a73612afd2
6 changed files with 73 additions and 57 deletions
|
@ -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))
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -76,39 +76,9 @@
|
|||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
|
||||
<dt class="block-display info-block">
|
||||
The following info will be displayed to listeners in their media player:
|
||||
</dt>
|
||||
|
||||
<dt id="outputGenre-label" class="block-display">
|
||||
<label for="outputGenre"><?php echo $this->element->getElement('genre')->getLabel()?></label>
|
||||
</dt>
|
||||
<dd id="outputGenre-element" class="block-display">
|
||||
<?php echo $this->element->getElement('genre')?>
|
||||
<?php if($this->element->getElement('genre')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('genre')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
|
||||
<dt id="stationURL-label" class="block-display">
|
||||
<label for="stationURL"><?php echo $this->element->getElement('url')->getLabel()?><span class="info-text-small">(Your radio station website)</span> :</label>
|
||||
</dt>
|
||||
<dd id="stationURL-element" class="block-display clearfix">
|
||||
<?php echo $this->element->getElement('url')?>
|
||||
<?php if($this->element->getElement('url')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('url')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
|
||||
<dt id="stationDescription-label" class="block-display">
|
||||
<label for="stationDescription"><?php echo $this->element->getElement('description')->getLabel()?></label>
|
||||
</dt>
|
||||
|
@ -122,12 +92,37 @@
|
|||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
|
||||
<dt id="stationURL-label" class="block-display">
|
||||
<label for="stationURL"><?php echo $this->element->getElement('url')->getLabel()?><span class="info-text-small">(Your radio station website)</span> :</label>
|
||||
</dt>
|
||||
<dd id="stationURL-element" class="block-display clearfix">
|
||||
<?php echo $this->element->getElement('url')?>
|
||||
<?php if($this->element->getElement('url')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('url')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="outputGenre-label" class="block-display">
|
||||
<label for="outputGenre"><?php echo $this->element->getElement('genre')->getLabel()?></label>
|
||||
</dt>
|
||||
<dd id="outputGenre-element" class="block-display">
|
||||
<?php echo $this->element->getElement('genre')?>
|
||||
<?php if($this->element->getElement('genre')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('genre')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="outputMountpoint-label" class="block-display">
|
||||
<label for="outputMountpoint"><?php echo $this->element->getElement('mount')->getLabel()?><span class="info-text-small">(Your radio station website)</span> :</label>
|
||||
</dt>
|
||||
<dd id="outputMountpoint-element" class="block-display">
|
||||
<?php echo $this->element->getElement('mount')?><span id="mount_ext" class="input-info">.<?php echo $this->element->getElement('type')->getValue()?></span>
|
||||
<?php echo $this->element->getElement('mount')?>
|
||||
<?php if($this->element->getElement('mount')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('mount')->getMessages() as $error): ?>
|
||||
|
@ -140,7 +135,7 @@
|
|||
<label for="outputStreamURL">Stream URL: </label>
|
||||
</dt>
|
||||
<dd id="outputStreamURL-element" class="block-display">
|
||||
<p id="stream_url"><?php echo $this->stream_url?></p>
|
||||
<p id="stream_url"></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue