diff --git a/airtime_mvc/application/logging/Logging.php b/airtime_mvc/application/logging/Logging.php
index bf9dbea92..d6ffff815 100644
--- a/airtime_mvc/application/logging/Logging.php
+++ b/airtime_mvc/application/logging/Logging.php
@@ -5,11 +5,12 @@ class Logging {
private static $_logger;
private static $_path;
- public static function getLogger(){
+ public static function getLogger()
+ {
if (!isset(self::$_logger)) {
$writer = new Zend_Log_Writer_Stream(self::$_path);
- if (Zend_Version::compareVersion("1.11") > 0){
+ if (Zend_Version::compareVersion("1.11") > 0) {
//Running Zend version 1.10 or lower. Need to instantiate our
//own Zend Log class with backported code from 1.11.
require_once __DIR__."/AirtimeLog.php";
@@ -22,33 +23,50 @@ class Logging {
return self::$_logger;
}
- public static function setLogPath($path){
+ public static function setLogPath($path)
+ {
self::$_path = $path;
}
- public static function toString($p_msg){
- if (is_array($p_msg) || is_object($p_msg)){
+ public static function toString($p_msg)
+ {
+ if (is_array($p_msg) || is_object($p_msg)) {
return print_r($p_msg, true);
} else {
return $p_msg;
}
}
- public static function log($p_msg){
+ public static function log($p_msg)
+ {
$bt = debug_backtrace();
+
$caller = array_shift($bt);
+ $file = basename($caller['file']);
+ $line = $caller['line'];
+ $caller = array_shift($bt);
+ $function = $caller['function'];
+
$logger = self::getLogger();
- $logger->info(self::toString($p_msg)." - file:".$caller['file'].":".$caller['line']);
+ $logger->info("[$file : $function() : line $line] - ".self::toString($p_msg));
}
- public static function debug($p_msg){
+ public static function debug($p_msg)
+ {
$bt = debug_backtrace();
+
$caller = array_shift($bt);
+ $file = basename($caller['file']);
+ $line = $caller['line'];
- if (defined('APPLICATION_ENV') && APPLICATION_ENV == "development"){
+ $caller = array_shift($bt);
+ $function = $caller['function'];
+
+
+ if (defined('APPLICATION_ENV') && APPLICATION_ENV == "development") {
$logger = self::getLogger();
- $logger->debug(self::toString($p_msg)." - file:".$caller['file'].":".$caller['line']);
+ $logger->debug("[$file : $function() : line $line] - ".self::toString($p_msg));
}
}
}
diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php
index cc581fc72..adb86936c 100644
--- a/airtime_mvc/application/models/Show.php
+++ b/airtime_mvc/application/models/Show.php
@@ -1646,6 +1646,15 @@ class Application_Model_Show
} elseif ($p_editable && $nowEpoch < $endsEpoch) {
$options["editable"] = true;
}
+
+ $showInstance = new Application_Model_ShowInstance($show["instance_id"]);
+ $showContent = $showInstance->getShowListContent();
+ if (empty($showContent)) {
+ $options["show_empty"] = 1;
+ } else {
+ $options["show_empty"] = 0;
+ }
+
$events[] = &self::makeFullCalendarEvent($show, $options, $startsDT, $endsDT, $startsEpochStr, $endsEpochStr);
}
diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css
index f1f237192..f4948dab8 100644
--- a/airtime_mvc/public/css/styles.css
+++ b/airtime_mvc/public/css/styles.css
@@ -1882,17 +1882,21 @@ span.errors.sp-errors{
}
.small-icon.recording {
background:url(images/icon_record.png) no-repeat 0 0;
+ margin-top: 0px !important;
}
.small-icon.rebroadcast {
background:url(images/icon_rebroadcast.png) no-repeat 0 0;
+ margin-top: 0px !important;
}
.small-icon.soundcloud {
background:url(images/icon_soundcloud.png) no-repeat 0 0;
width:21px;
+ margin-top: 0px !important;
}
.small-icon.sc-error {
background:url(images/icon_soundcloud_error2.png) no-repeat 0 0;
width:21px;
+ margin-top: 0px !important;
}
.small-icon.now-playing {
background:url(images/icon_nowplaying_n.png) no-repeat 0 0;
@@ -1905,6 +1909,7 @@ span.errors.sp-errors{
border-radius:2px;
-webkit-border-radius:2px;
-moz-border-radius:2px;
+ margin-top: 0px !important;
}
.small-icon.alert {
background:url(images/icon_alert.png) no-repeat;
@@ -1913,6 +1918,11 @@ span.errors.sp-errors{
margin-right:3px;
margin-left:1px;
}
+.small-icon.show-empty {
+ background:url(redmond/images/ui-icons_ff5d1a_256x240.png) no-repeat 0 -144px;
+ width: 16px;
+ margin-top: 0px !important;
+}
.medium-icon {
display:block;
width:25px;
diff --git a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js
index 5a6d8bc46..88435c84e 100644
--- a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js
+++ b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js
@@ -253,6 +253,33 @@ function eventRender(event, element, view) {
} else if (view.name === 'month' && event.record === 1 && event.soundcloud_id === -3) {
$(element).find(".fc-event-title").after('');
}
+
+ //add scheduled show content empty icon
+ if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
+ if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
+ if (event.soundcloud_id === -1) {
+ $(element).find(".fc-event-time").before('');
+ } else if (event.soundcloud_id > 0) {
+
+ } else if (event.soundcloud_id === -2) {
+
+ } else if (event.soundcloud_id === -3) {
+
+ }
+ }
+ } else if (view.name === 'month') {
+ if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
+ if (event.soundcloud_id === -1) {
+ $(element).find(".fc-event-title").after('');
+ } else if (event.soundcloud_id > 0) {
+
+ } else if (event.soundcloud_id === -2) {
+
+ } else if (event.soundcloud_id === -3) {
+
+ }
+ }
+ }
//rebroadcast icon
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.rebroadcast === 1) {
@@ -460,6 +487,24 @@ function addQtipToSCIcons(ele){
ready: true // Needed to make it show on first mouseover event
}
});
+ }else if ($(ele).hasClass("show-empty")){
+ $(ele).qtip({
+ content: {
+ text: "This show has no scheduled content."
+ },
+ position:{
+ adjust: {
+ resize: true,
+ method: "flip flip"
+ },
+ at: "right center",
+ my: "left top",
+ viewport: $(window)
+ },
+ show: {
+ ready: true // Needed to make it show on first mouseover event
+ }
+ });
}
}
diff --git a/python_apps/pypo/install/pypo-initialize.py b/python_apps/pypo/install/pypo-initialize.py
index 964422c37..357aa49c6 100644
--- a/python_apps/pypo/install/pypo-initialize.py
+++ b/python_apps/pypo/install/pypo-initialize.py
@@ -87,6 +87,13 @@ try:
liq_path = p.communicate()[0].strip()
if p.returncode == 0:
+ try:
+ os.unlink(liq_path)
+ except Exception:
+ #liq_path DNE, which is OK.
+ pass
+
+
os.symlink(liq_path, "/usr/bin/airtime-liquidsoap")
else:
print " * Liquidsoap binary not found!"