CC-3427: Live Stream: Ability to switch off Scheduled Play
- done
This commit is contained in:
parent
e31ac81e74
commit
4eefc05366
|
@ -326,6 +326,8 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$switch_status = array();
|
$switch_status = array();
|
||||||
$live_dj = Application_Model_Preference::GetSourceStatus("live_dj");
|
$live_dj = Application_Model_Preference::GetSourceStatus("live_dj");
|
||||||
$master_dj = Application_Model_Preference::GetSourceStatus("master_dj");
|
$master_dj = Application_Model_Preference::GetSourceStatus("master_dj");
|
||||||
|
|
||||||
|
$scheduled_play_switch = Application_Model_Preference::GetSourceSwitchStatus("scheduled_play");
|
||||||
$live_dj_switch = Application_Model_Preference::GetSourceSwitchStatus("live_dj");
|
$live_dj_switch = Application_Model_Preference::GetSourceSwitchStatus("live_dj");
|
||||||
$master_dj_switch = Application_Model_Preference::GetSourceSwitchStatus("master_dj");
|
$master_dj_switch = Application_Model_Preference::GetSourceSwitchStatus("master_dj");
|
||||||
|
|
||||||
|
@ -336,6 +338,7 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
|
|
||||||
$switch_status['live_dj_source'] = $live_dj_switch;
|
$switch_status['live_dj_source'] = $live_dj_switch;
|
||||||
$switch_status['master_dj_source'] = $master_dj_switch;
|
$switch_status['master_dj_source'] = $master_dj_switch;
|
||||||
|
$switch_status['scheduled_play'] = $scheduled_play_switch;
|
||||||
$this->view->switch_status = $switch_status;
|
$this->view->switch_status = $switch_status;
|
||||||
|
|
||||||
$this->view->entries = $range;
|
$this->view->entries = $range;
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
$sss = $this->SourceSwitchStatus();
|
$sss = $this->SourceSwitchStatus();
|
||||||
$scs = $this->SourceConnectionStatus();?>
|
$scs = $this->SourceConnectionStatus();?>
|
||||||
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
|
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
|
||||||
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'])) ?>
|
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'],
|
||||||
|
"scheduled_play_switch"=>$sss['scheduled_play'])) ?>
|
||||||
|
|
||||||
<?php $partial = array('menu.phtml', 'default');
|
<?php $partial = array('menu.phtml', 'default');
|
||||||
$this->navigation()->menu()->setPartial($partial); ?>
|
$this->navigation()->menu()->setPartial($partial); ?>
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
$scs = $this->SourceConnectionStatus();
|
$scs = $this->SourceConnectionStatus();
|
||||||
?>
|
?>
|
||||||
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
|
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
|
||||||
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'])) ?>
|
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'],
|
||||||
|
"scheduled_play_switch"=>$sss['scheduled_play'])) ?>
|
||||||
|
|
||||||
<?php $partial = array('menu.phtml', 'default');
|
<?php $partial = array('menu.phtml', 'default');
|
||||||
$this->navigation()->menu()->setPartial($partial); ?>
|
$this->navigation()->menu()->setPartial($partial); ?>
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
$sss = $this->SourceSwitchStatus();
|
$sss = $this->SourceSwitchStatus();
|
||||||
$scs = $this->SourceConnectionStatus(); ?>
|
$scs = $this->SourceConnectionStatus(); ?>
|
||||||
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
|
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
|
||||||
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'])) ?>
|
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'],
|
||||||
|
"scheduled_play_switch"=>$sss['scheduled_play'])) ?>
|
||||||
|
|
||||||
<?php $partial = array('menu.phtml', 'default');
|
<?php $partial = array('menu.phtml', 'default');
|
||||||
$this->navigation()->menu()->setPartial($partial); ?>
|
$this->navigation()->menu()->setPartial($partial); ?>
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
class Airtime_View_Helper_SourceSwitchStatus extends Zend_View_Helper_Abstract{
|
class Airtime_View_Helper_SourceSwitchStatus extends Zend_View_Helper_Abstract{
|
||||||
public function SourceSwitchStatus(){
|
public function SourceSwitchStatus(){
|
||||||
$status = array("live_dj"=>Application_Model_Preference::GetSourceSwitchStatus("live_dj"), "master_dj"=>Application_Model_Preference::GetSourceSwitchStatus("master_dj"));
|
$status = array("live_dj"=>Application_Model_Preference::GetSourceSwitchStatus("live_dj"),
|
||||||
|
"master_dj"=>Application_Model_Preference::GetSourceSwitchStatus("master_dj"),
|
||||||
|
"scheduled_play"=>Application_Model_Preference::GetSourceSwitchStatus("scheduled_play"));
|
||||||
return $status;
|
return $status;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -23,9 +23,9 @@
|
||||||
<div class="source-info-block">
|
<div class="source-info-block">
|
||||||
<ul>
|
<ul>
|
||||||
<li>Source Streams</li>
|
<li>Source Streams</li>
|
||||||
<li><div id="airtime_connection" class="source-connection off"></div>Airtime<div class="line-to-on-air"></div></li>
|
<li><div id="scheduled_play_connection" style="width:19px;"></div>Scheduled Play<div class="line-to-on-air off"></div><a href="#" id="scheduled_play" class="source-switch-button"><span><?php echo $this->scheduled_play_switch?></span></a><div class="line-to-switch off"></div></li>
|
||||||
<li><div id="live_dj_connection" class="source-connection off"></div>Live DJ<div class="line-to-on-air"></div><a href="#" id="live_dj" class="source-switch-button"><span><?php echo $this->live_dj_switch?></span></a><div class="line-to-switch"></div></li>
|
<li><div id="live_dj_connection" class="source-connection off"></div>Live DJ<div class="line-to-on-air off"></div><a href="#" id="live_dj" class="source-switch-button"><span><?php echo $this->live_dj_switch?></span></a><div class="line-to-switch off"></div></li>
|
||||||
<li><div id="master_dj_connection" class="source-connection off"></div>Master DJ<div class="line-to-on-air"></div><a href="#" id="master_dj" class="source-switch-button"><span><?php echo $this->master_dj_switch?></span></a><div class="line-to-switch"></div></li>
|
<li><div id="master_dj_connection" class="source-connection off"></div>Master DJ<div class="line-to-on-air off"></div><a href="#" id="master_dj" class="source-switch-button"><span><?php echo $this->master_dj_switch?></span></a><div class="line-to-switch off"></div></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="on-air-block">
|
<div class="on-air-block">
|
||||||
|
|
|
@ -438,18 +438,33 @@ select {
|
||||||
height:6px;
|
height:6px;
|
||||||
border:1px solid #242424;
|
border:1px solid #242424;
|
||||||
border-width:1px 1px 0 1px;
|
border-width:1px 1px 0 1px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-to-switch.off{
|
||||||
background:#FFFFFF
|
background:#FFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.line-to-switch.on{
|
||||||
|
background:#D40000
|
||||||
|
}
|
||||||
|
|
||||||
.line-to-on-air {
|
.line-to-on-air {
|
||||||
float: right;
|
float: right;
|
||||||
height:6px;
|
height:6px;
|
||||||
border:1px solid #242424;
|
border:1px solid #242424;
|
||||||
border-width:1px 1px 0 1px;
|
border-width:1px 1px 0 1px;
|
||||||
width: 10px;
|
width: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-to-on-air.off{
|
||||||
background:#FFFFFF
|
background:#FFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.line-to-on-air.on{
|
||||||
|
background:#D$0000
|
||||||
|
}
|
||||||
|
|
||||||
/* END Master Panel */
|
/* END Master Panel */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ var uiUpdateInterval = 200;
|
||||||
|
|
||||||
var master_dj_on_air = false;
|
var master_dj_on_air = false;
|
||||||
var live_dj_on_air = false;
|
var live_dj_on_air = false;
|
||||||
var airtime_on_air = false;
|
var scheduled_play_on_air = false;
|
||||||
|
|
||||||
//var timezoneOffset = 0;
|
//var timezoneOffset = 0;
|
||||||
|
|
||||||
|
@ -80,22 +80,20 @@ function updateProgressBarValue(){
|
||||||
songPercentDone = 0;
|
songPercentDone = 0;
|
||||||
currentSong = null;
|
currentSong = null;
|
||||||
} else {
|
} else {
|
||||||
var airtime_connection = $("#airtime_connection")
|
var scheduled_play_connection = $("#scheduled_play_connection").parent().find(".line-to-switch")
|
||||||
if (currentSong.media_item_played == "t" && currentShow.length > 0){
|
if (currentSong.media_item_played == "t" && currentShow.length > 0){
|
||||||
//$('#on-air-info').attr("class", "on-air-info on");
|
scheduled_play_connection.attr("class", "line-to-switch on");
|
||||||
airtime_connection.attr("class", "source-connection on");
|
//scheduled_play_on_air = true;
|
||||||
airtime_on_air = true;
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//$('#on-air-info').attr("class", "on-air-info off");
|
//scheduled_play_on_air = false;
|
||||||
airtime_on_air = false;
|
scheduled_play_connection.attr("class", "line-to-switch off");
|
||||||
airtime_connection.attr("class", "source-connection off");
|
|
||||||
}
|
}
|
||||||
$('#progress-show').attr("class", "progress-show");
|
$('#progress-show').attr("class", "progress-show");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$('#on-air-info').attr("class", "on-air-info off");
|
$('#on-air-info').attr("class", "on-air-info off");
|
||||||
$("#airtime_connection").attr("class", "source-connection off");
|
$("#scheduled_play_connection").parent().find(".line-to-switch").attr("class", "line-to-switch off");
|
||||||
$('#progress-show').attr("class", "progress-show-error");
|
$('#progress-show').attr("class", "progress-show-error");
|
||||||
}
|
}
|
||||||
$('#progress-bar').attr("style", "width:"+songPercentDone+"%");
|
$('#progress-bar').attr("style", "width:"+songPercentDone+"%");
|
||||||
|
@ -232,38 +230,20 @@ function parseItems(obj){
|
||||||
localRemoteTimeOffset = date.getTime() - schedulePosixTime;
|
localRemoteTimeOffset = date.getTime() - schedulePosixTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeLineToWhite(div){
|
|
||||||
div.css("background", "#FFFFFF")
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeLineToRed(div){
|
|
||||||
div.css("background", "#D40000")
|
|
||||||
}
|
|
||||||
|
|
||||||
function ColorOnSourceConnection(div){
|
|
||||||
div.attr("class", "source-connection on");
|
|
||||||
changeLineToRed(div.parent().find(".line-to-switch"))
|
|
||||||
}
|
|
||||||
|
|
||||||
function ColorOnSourceDisconnection(div){
|
|
||||||
div.attr("class", "source-connection off");
|
|
||||||
changeLineToWhite(div.parent().find(".line-to-switch"))
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseSourceStatus(obj){
|
function parseSourceStatus(obj){
|
||||||
var live_div = $("#live_dj_connection")
|
var live_div = $("#live_dj_connection").parent().find(".line-to-switch")
|
||||||
var master_div = $("#master_dj_connection")
|
var master_div = $("#master_dj_connection").parent().find(".line-to-switch")
|
||||||
|
|
||||||
if(obj.live_dj_source == false){
|
if(obj.live_dj_source == false){
|
||||||
ColorOnSourceDisconnection(live_div)
|
live_div.attr("class", "line-to-switch off")
|
||||||
}else{
|
}else{
|
||||||
ColorOnSourceConnection(live_div)
|
live_div.attr("class", "line-to-switch on")
|
||||||
}
|
}
|
||||||
|
|
||||||
if(obj.master_dj_source == false){
|
if(obj.master_dj_source == false){
|
||||||
ColorOnSourceDisconnection(master_div)
|
master_div.attr("class", "line-to-switch off")
|
||||||
}else{
|
}else{
|
||||||
ColorOnSourceConnection(master_div)
|
master_div.attr("class", "line-to-switch on")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,26 +252,30 @@ function parseSwitchStatus(obj){
|
||||||
var master_div = $("#master_dj_connection")
|
var master_div = $("#master_dj_connection")
|
||||||
|
|
||||||
if(obj.live_dj_source == "on" && obj.master_dj_source == "off"){
|
if(obj.live_dj_source == "on" && obj.master_dj_source == "off"){
|
||||||
//changeLineToRed(live_div.parent().find(".line-to-on-air"))
|
|
||||||
live_dj_on_air = true;
|
live_dj_on_air = true;
|
||||||
}else{
|
}else{
|
||||||
//changeLineToWhite(live_div.parent().find(".line-to-on-air"))
|
|
||||||
live_dj_on_air = false;
|
live_dj_on_air = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(obj.master_dj_source == "on"){
|
if(obj.master_dj_source == "on"){
|
||||||
//changeLineToRed(master_div.parent().find(".line-to-on-air"))
|
|
||||||
master_dj_on_air = true;
|
master_dj_on_air = true;
|
||||||
}else{
|
}else{
|
||||||
master_dj_on_air = false;
|
master_dj_on_air = false;
|
||||||
//changeLineToWhite(master_div.parent().find(".line-to-on-air"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(obj.scheduled_play == "on"){
|
||||||
|
scheduled_play_on_air = true;
|
||||||
|
}else{
|
||||||
|
scheduled_play_on_air = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#scheduled_play.source-switch-button").find("span").html(obj.scheduled_play)
|
||||||
$("#live_dj.source-switch-button").find("span").html(obj.live_dj_source)
|
$("#live_dj.source-switch-button").find("span").html(obj.live_dj_source)
|
||||||
$("#master_dj.source-switch-button").find("span").html(obj.master_dj_source)
|
$("#master_dj.source-switch-button").find("span").html(obj.master_dj_source)
|
||||||
}
|
}
|
||||||
|
|
||||||
function controlOnAirLight(){
|
function controlOnAirLight(){
|
||||||
if(airtime_on_air || live_dj_on_air || master_dj_on_air){
|
if(scheduled_play_on_air || live_dj_on_air || master_dj_on_air){
|
||||||
$('#on-air-info').attr("class", "on-air-info on");
|
$('#on-air-info').attr("class", "on-air-info on");
|
||||||
}else{
|
}else{
|
||||||
$('#on-air-info').attr("class", "on-air-info off");
|
$('#on-air-info').attr("class", "on-air-info off");
|
||||||
|
@ -301,24 +285,24 @@ function controlOnAirLight(){
|
||||||
function controlSwitchLight(){
|
function controlSwitchLight(){
|
||||||
var live_div = $("#live_dj_connection")
|
var live_div = $("#live_dj_connection")
|
||||||
var master_div = $("#master_dj_connection")
|
var master_div = $("#master_dj_connection")
|
||||||
var airtime_div = $("#airtime_connection")
|
var scheduled_play_div = $("#scheduled_play_connection")
|
||||||
|
|
||||||
if(airtime_on_air && !live_dj_on_air && !master_dj_on_air){
|
if(scheduled_play_on_air && !live_dj_on_air && !master_dj_on_air){
|
||||||
changeLineToRed(airtime_div.parent().find(".line-to-on-air"))
|
scheduled_play_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air on")
|
||||||
changeLineToWhite(live_div.parent().find(".line-to-on-air"))
|
live_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air off")
|
||||||
changeLineToWhite(master_div.parent().find(".line-to-on-air"))
|
master_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air off")
|
||||||
}else if(live_dj_on_air && !master_dj_on_air){
|
}else if(live_dj_on_air && !master_dj_on_air){
|
||||||
changeLineToWhite(airtime_div.parent().find(".line-to-on-air"))
|
scheduled_play_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air off")
|
||||||
changeLineToRed(live_div.parent().find(".line-to-on-air"))
|
live_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air on")
|
||||||
changeLineToWhite(master_div.parent().find(".line-to-on-air"))
|
master_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air off")
|
||||||
}else if(master_dj_on_air){
|
}else if(master_dj_on_air){
|
||||||
changeLineToWhite(airtime_div.parent().find(".line-to-on-air"))
|
scheduled_play_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air off")
|
||||||
changeLineToWhite(live_div.parent().find(".line-to-on-air"))
|
live_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air off")
|
||||||
changeLineToRed(master_div.parent().find(".line-to-on-air"))
|
master_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air on")
|
||||||
}else{
|
}else{
|
||||||
changeLineToWhite(airtime_div.parent().find(".line-to-on-air"))
|
scheduled_play_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air off")
|
||||||
changeLineToWhite(live_div.parent().find(".line-to-on-air"))
|
live_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air off")
|
||||||
changeLineToWhite(master_div.parent().find(".line-to-on-air"))
|
master_div.parent().find(".line-to-on-air").attr("class", "line-to-on-air off")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +345,7 @@ function setSwitchListener(){
|
||||||
var sourcename = $(this).attr('id')
|
var sourcename = $(this).attr('id')
|
||||||
var status_span = $(this).find("span")
|
var status_span = $(this).find("span")
|
||||||
var status = status_span.html()
|
var status = status_span.html()
|
||||||
var _class = $(this).parent().find("div.source-connection").attr("class")
|
var _class = $(this).parent().find("div.line-to-switch").attr("class")
|
||||||
var source_connection_status = false
|
var source_connection_status = false
|
||||||
|
|
||||||
if(_class.indexOf("off") > 0){
|
if(_class.indexOf("off") > 0){
|
||||||
|
|
|
@ -26,20 +26,6 @@ def transition(a,b) =
|
||||||
fade.final(duration=!default_dj_fade_out, a) ])
|
fade.final(duration=!default_dj_fade_out, a) ])
|
||||||
end
|
end
|
||||||
|
|
||||||
def transition_to_live(a,b) =
|
|
||||||
log("transition called...")
|
|
||||||
#add(normalize=false,
|
|
||||||
# [fade.initial(duration=5.,type="log", b),fade.final(duration=5.,type="log",a)])
|
|
||||||
smooth_add(delay=10., normal=a, special=b)
|
|
||||||
end
|
|
||||||
|
|
||||||
def transition_from_live(a,b) =
|
|
||||||
log("transition called...")
|
|
||||||
#add(normalize=false,
|
|
||||||
# [fade.initial(duration=5.,type="log", b),fade.final(duration=5.,type="log",a)])
|
|
||||||
smooth_add(delay=10., normal=b, special=a)
|
|
||||||
end
|
|
||||||
|
|
||||||
def crossfade(s)
|
def crossfade(s)
|
||||||
#duration is automatically overwritten by metadata fields passed in
|
#duration is automatically overwritten by metadata fields passed in
|
||||||
#with audio
|
#with audio
|
||||||
|
|
|
@ -45,6 +45,7 @@ ignore(output.dummy(default, fallible=true))
|
||||||
|
|
||||||
master_dj_enabled = ref false;
|
master_dj_enabled = ref false;
|
||||||
live_dj_enabled = ref false;
|
live_dj_enabled = ref false;
|
||||||
|
scheduled_play_enabled = ref true;
|
||||||
|
|
||||||
def make_master_dj_available()
|
def make_master_dj_available()
|
||||||
master_dj_enabled := true
|
master_dj_enabled := true
|
||||||
|
@ -62,6 +63,14 @@ def make_live_dj_unavailable()
|
||||||
live_dj_enabled := false
|
live_dj_enabled := false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def make_scheduled_play_available()
|
||||||
|
scheduled_play_enabled := true
|
||||||
|
end
|
||||||
|
|
||||||
|
def make_scheduled_play_unavailable()
|
||||||
|
scheduled_play_enabled := false
|
||||||
|
end
|
||||||
|
|
||||||
#live stream setup
|
#live stream setup
|
||||||
set("harbor.bind_addr", "0.0.0.0")
|
set("harbor.bind_addr", "0.0.0.0")
|
||||||
|
|
||||||
|
@ -94,7 +103,6 @@ def check_master_dj_client(user,password) =
|
||||||
ret = list.hd(ret)
|
ret = list.hd(ret)
|
||||||
#return true to let the client transmit data, or false to tell harbor to decline
|
#return true to let the client transmit data, or false to tell harbor to decline
|
||||||
if (ret == "True") then
|
if (ret == "True") then
|
||||||
#master_dj_connect()
|
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
|
@ -108,7 +116,6 @@ def check_dj_client(user,password) =
|
||||||
ret = list.hd(ret)
|
ret = list.hd(ret)
|
||||||
#return true to let the client transmit data, or false to tell harbor to decline
|
#return true to let the client transmit data, or false to tell harbor to decline
|
||||||
if (ret == "True") then
|
if (ret == "True") then
|
||||||
#live_dj_connect()
|
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
|
@ -139,7 +146,7 @@ def append_dj_inputs(master_harbor_input_port, master_harbor_input_mount_point,
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
s = fallback(id="default_fallback", track_sensitive=false, [queue, default])
|
s = switch(id="default_switch", track_sensitive=false, transitions=[transition, transition], [({!scheduled_play_enabled},queue),({true},default)])
|
||||||
s = append_dj_inputs(master_live_stream_port, master_live_stream_mp, dj_live_stream_port, dj_live_stream_mp, s)
|
s = append_dj_inputs(master_live_stream_port, master_live_stream_mp, dj_live_stream_port, dj_live_stream_mp, s)
|
||||||
|
|
||||||
s = crossfade(s)
|
s = crossfade(s)
|
||||||
|
@ -182,6 +189,16 @@ server.register(namespace="streams",
|
||||||
usage="live_dj_start",
|
usage="live_dj_start",
|
||||||
"live_dj_start",
|
"live_dj_start",
|
||||||
fun (s) -> begin make_live_dj_available() "Done." end)
|
fun (s) -> begin make_live_dj_available() "Done." end)
|
||||||
|
server.register(namespace="streams",
|
||||||
|
description="Stop Scheduled Play source.",
|
||||||
|
usage="scheduled_play_stop",
|
||||||
|
"scheduled_play_stop",
|
||||||
|
fun (s) -> begin make_scheduled_play_unavailable() "Done." end)
|
||||||
|
server.register(namespace="streams",
|
||||||
|
description="Start Scheduled Play source.",
|
||||||
|
usage="scheduled_play_start",
|
||||||
|
"scheduled_play_start",
|
||||||
|
fun (s) -> begin make_scheduled_play_available() "Done." end)
|
||||||
|
|
||||||
if output_sound_device then
|
if output_sound_device then
|
||||||
|
|
||||||
|
|
|
@ -107,9 +107,11 @@ class PypoFetch(Thread):
|
||||||
command = "streams."
|
command = "streams."
|
||||||
if(sourcename == "master_dj"):
|
if(sourcename == "master_dj"):
|
||||||
command += "master_dj_"
|
command += "master_dj_"
|
||||||
else:
|
elif(sourcename == "live_dj"):
|
||||||
command += "live_dj_"
|
command += "live_dj_"
|
||||||
|
elif(sourcename == "scheduled_play"):
|
||||||
|
command += "scheduled_play_"
|
||||||
|
|
||||||
if(status == "on"):
|
if(status == "on"):
|
||||||
command += "start\n"
|
command += "start\n"
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue