diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php
index 4a4cfb98d..f8d434273 100644
--- a/airtime_mvc/application/controllers/ScheduleController.php
+++ b/airtime_mvc/application/controllers/ScheduleController.php
@@ -600,6 +600,7 @@ class ScheduleController extends Zend_Controller_Action
$what = $formWhat->isValid($data);
$when = $formWhen->isValid($data);
+ $live = $formLive->isValid($data);
if($when) {
$when = $formWhen->checkReliantFields($data, $startDateModified);
}
@@ -691,7 +692,7 @@ class ScheduleController extends Zend_Controller_Action
$who = $formWho->isValid($data);
$style = $formStyle->isValid($data);
- if ($what && $when && $repeats && $who && $style) {
+ if ($what && $when && $repeats && $who && $style && $live) {
if(!$isSaas){
if($record && $rebroadAb && $rebroad){
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
diff --git a/airtime_mvc/application/forms/AddShowLiveStream.php b/airtime_mvc/application/forms/AddShowLiveStream.php
index 44e6e4087..e4b1b9d91 100644
--- a/airtime_mvc/application/forms/AddShowLiveStream.php
+++ b/airtime_mvc/application/forms/AddShowLiveStream.php
@@ -47,8 +47,31 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
->setDecorators(array('ViewHelper'));
$this->addElement($custom_password);
+ $connection_url = Application_Model_Preference::GetLiveDJSourceConnectionURL();
+ if(trim($connection_url) == ""){
+ $connection_url = "N/A";
+ }
+
$this->setDecorators(array(
- array('ViewScript', array('viewScript' => 'form/add-show-live-stream.phtml', "connection_url"=>Application_Model_Preference::GetLiveDJSourceConnectionURL()))
+ array('ViewScript', array('viewScript' => 'form/add-show-live-stream.phtml', "connection_url"=>$connection_url))
));
}
+
+ public function isValid($data){
+ $isValid = parent::isValid($data);
+
+ if($data['cb_custom_auth'] == 1){
+ if(trim($data['custom_username']) == ''){
+ $element = $this->getElement("custom_username");
+ $element->addError("Username field cannot be empty.");
+ $isValid = false;
+ }
+ if(trim($data['custom_password']) == ''){
+ $element = $this->getElement("custom_password");
+ $element->addError("Password field cannot be empty.");
+ $isValid = false;
+ }
+ }
+ return $isValid;
+ }
}
\ No newline at end of file
diff --git a/airtime_mvc/application/views/scripts/form/add-show-live-stream.phtml b/airtime_mvc/application/views/scripts/form/add-show-live-stream.phtml
index aed91716d..d20205976 100644
--- a/airtime_mvc/application/views/scripts/form/add-show-live-stream.phtml
+++ b/airtime_mvc/application/views/scripts/form/add-show-live-stream.phtml
@@ -26,36 +26,36 @@
element->getElement('cb_custom_auth') ?>
-
-
-
-
-
-
- element->getElement('custom_username') ?>
- element->getElement('custom_username')->hasErrors()) : ?>
-
- element->getElement('custom_username')->getMessages() as $error): ?>
-
-
-
-
-
-
-
-
-
- element->getElement('custom_password') ?>
- element->getElement('custom_password')->hasErrors()) : ?>
-
- element->getElement('custom_password')->getMessages() as $error): ?>
-
-
-
-
-
+
+
+
+
+
+ element->getElement('custom_username') ?>
+ element->getElement('custom_username')->hasErrors()) : ?>
+
+ element->getElement('custom_username')->getMessages() as $error): ?>
+
+
+
+
+
+
+
+
+
+ element->getElement('custom_password') ?>
+ element->getElement('custom_password')->hasErrors()) : ?>
+
+ element->getElement('custom_password')->getMessages() as $error): ?>
+
+
+
+
+
+
diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js
index f4c6f7b49..5890b0ccf 100644
--- a/airtime_mvc/public/js/airtime/schedule/add-show.js
+++ b/airtime_mvc/public/js/airtime/schedule/add-show.js
@@ -401,6 +401,21 @@ function setAddShowEvents() {
// calculate duration
calculateDuration(endDateTime, startDateTime);
});
+
+
+ if($('#cb_custom_auth').attr('checked')){
+ $('#custom_auth_div').show()
+ }else{
+ $('#custom_auth_div').hide()
+ }
+
+ $('#cb_custom_auth').change(function(){
+ if($(this).attr('checked')){
+ $('#custom_auth_div').show()
+ }else{
+ $('#custom_auth_div').hide()
+ }
+ })
function calculateDuration(endDateTime, startDateTime){
var duration;
@@ -446,6 +461,9 @@ function showErrorSections() {
$("#schedule-record-rebroadcast").show();
$("#add_show_rebroadcast_absolute").show();
}
+ if($("#live-stream-override .errors").length > 0) {
+ $("#live-stream-override").show();
+ }
if($("#add_show_rebroadcast_relative .errors").length > 0) {
$("#schedule-record-rebroadcast").show();
$("#add_show_rebroadcast_relative").show();
diff --git a/python_apps/pypo/airtime-playout-init-d b/python_apps/pypo/airtime-playout-init-d
index 688e4e790..a640cd312 100755
--- a/python_apps/pypo/airtime-playout-init-d
+++ b/python_apps/pypo/airtime-playout-init-d
@@ -28,7 +28,7 @@ liquidsoap_start () {
liquidsoap_stop () {
monit unmonitor airtime-liquidsoap >/dev/null 2>&1
- python /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_prepare_terminate.py
+ /usr/lib/airtime/airtime_virtualenv/bin/python2.6 /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_prepare_terminate.py
# Send TERM after 5 seconds, wait at most 30 seconds.
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE1
@@ -65,7 +65,7 @@ monit_restart() {
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE0
rm -f $PIDFILE0
- python /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_prepare_terminate.py
+ /usr/lib/airtime/airtime_virtualenv/bin/python2.6 /usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_prepare_terminate.py
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE1
rm -f $PIDFILE1