diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php
index 19ba883fb..943d3da54 100644
--- a/airtime_mvc/application/models/Schedule.php
+++ b/airtime_mvc/application/models/Schedule.php
@@ -525,12 +525,13 @@ class Application_Model_Schedule {
foreach ($items as $item){
- $storedFile = Application_Model_StoredFile::Recall($item["file_id"]);
- $uri = $storedFile->getFilePath();
-
$showEndDateTime = new DateTime($item["show_end"], $utcTimeZone);
$trackStartDateTime = new DateTime($item["start"], $utcTimeZone);
$trackEndDateTime = new DateTime($item["end"], $utcTimeZone);
+
+ if ($trackStartDateTime->getTimestamp() > $showEndDateTime->getTimestamp()){
+ continue;
+ }
/* Note: cue_out and end are always the same. */
/* TODO: Not all tracks will have "show_end" */
@@ -538,8 +539,12 @@ class Application_Model_Schedule {
$di = $trackStartDateTime->diff($showEndDateTime);
$item["cue_out"] = $di->format("%H:%i:%s").".000";
+ $item["end"] = $showEndDateTime->format("Y-m-d H:i:s");
}
+ $storedFile = Application_Model_StoredFile::Recall($item["file_id"]);
+ $uri = $storedFile->getFilePath();
+
$start = Application_Model_Schedule::AirtimeTimeToPypoTime($item["start"]);
$data["media"][$start] = array(
'id' => $storedFile->getGunid(),
diff --git a/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml b/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml
index d89021b2c..37459635b 100644
--- a/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml
+++ b/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml
@@ -79,7 +79,7 @@
master_dj_connection_url ?> override
- This is the URL to display to DJs who would like to connect a stream to Airtime. If Airtime is behind a router or firewall, you will need to use port forwarding on the router to forward connections to the ports that you configure here. For more detailed information on what this means, click here.
+ This is the URL used by remote sources to connect to Airtime. If Airtime is behind a router or firewall, you may need to configure port forwarding. For details, please read the Airtime manual.