Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
f308305df8
|
@ -284,6 +284,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_StreamSetting::setMasterLiveStreamMountPoint($values["master_harbor_input_mount_point"]);
|
||||
Application_Model_StreamSetting::setDjLiveStreamPort($values["dj_harbor_input_port"]);
|
||||
Application_Model_StreamSetting::setDjLiveStreamMountPoint($values["dj_harbor_input_mount_point"]);
|
||||
Application_Model_StreamSetting::setOffAirMeta($values['offAirMeta']);
|
||||
|
||||
// store stream update timestamp
|
||||
Application_Model_Preference::SetStreamUpdateTimestamp();
|
||||
|
|
|
@ -59,6 +59,12 @@ class Application_Form_StreamSetting extends Zend_Form
|
|||
$stream_format->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($stream_format);
|
||||
|
||||
$offAirMeta = new Zend_Form_Element_Text('offAirMeta');
|
||||
$offAirMeta->setLabel(_('Off Air Meatadata'))
|
||||
->setValue(Application_Model_StreamSetting::getOffAirMeta())
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($offAirMeta);
|
||||
|
||||
$replay_gain = new Zend_Form_Element_Hidden("replayGainModifier");
|
||||
$replay_gain->setLabel(_("Replay Gain Modifier"))
|
||||
->setValue(Application_Model_Preference::getReplayGainModifier())
|
||||
|
|
|
@ -449,4 +449,12 @@ class Application_Model_StreamSetting
|
|||
public static function setAdminPass($stream, $v){
|
||||
self::setValue($stream."_admin_pass", $v, "string");
|
||||
}
|
||||
|
||||
public static function getOffAirMeta(){
|
||||
return self::getValue("off_air_meta");
|
||||
}
|
||||
|
||||
public static function setOffAirMeta($offAirMeta){
|
||||
self::setValue("off_air_meta", $offAirMeta, "string");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,14 @@
|
|||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="offAirMeta-label">
|
||||
<label>
|
||||
<?php echo $this->form->getElement('offAirMeta')->getLabel() ?> :
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="offAirMeta-element">
|
||||
<?php echo $this->form->getElement('offAirMeta') ?>
|
||||
</dd>
|
||||
<dt id="replayGainModifier-label" class="block-display">
|
||||
<label><?php echo $this->form->getElement('replayGainModifier')->getLabel() ?>:
|
||||
</label>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
INSERT INTO cc_subjs ("login", "type", "pass") VALUES ('admin', 'A', md5('admin'));
|
||||
-- added in 2.3
|
||||
INSERT INTO cc_pref("keystr", "valstr") VALUES('off_air_meta', 'Airtime - offline');
|
||||
-- end of added in 2.3
|
||||
|
||||
-- added in 2.1
|
||||
INSERT INTO cc_pref("keystr", "valstr") VALUES('scheduled_play_switch', 'on');
|
||||
|
|
|
@ -120,7 +120,11 @@ server.register(namespace="dynamic_source",
|
|||
# fun (s) -> begin log("dynamic_source.read_stop") destroy_dynamic_source_all() end)
|
||||
|
||||
default = amplify(id="silence_src", 0.00001, noise())
|
||||
default = rewrite_metadata([("artist","Airtime"), ("title", "offline")], default)
|
||||
ref_off_air_meta = ref off_air_meta
|
||||
if !ref_off_air_meta == "" then
|
||||
ref_off_air_meta := "Airtime - offline"
|
||||
end
|
||||
default = rewrite_metadata([("title", !ref_off_air_meta)], default)
|
||||
ignore(output.dummy(default, fallible=true))
|
||||
|
||||
master_dj_enabled = ref false
|
||||
|
|
Loading…
Reference in New Issue