Permalink
Browse files

CC-3623: Need to send show name to Liquidsoap. (Currently sending nam…

…e as "TODO")

-fixed
  • Loading branch information...
1 parent 0ec58f0 commit d06b3573e9aafff5975a7d728ea1fbd6ab467a26 denise committed Apr 11, 2012
Showing with 10 additions and 4 deletions.
  1. +9 −2 airtime_mvc/application/models/Schedule.php
  2. +1 −2 python_apps/pypo/pypofetch.py
@@ -412,6 +412,7 @@ public static function GetItems($p_startTime, $p_endTime) {
$baseQuery = "SELECT st.file_id AS file_id,"
." st.id as id,"
+ ." st.instance_id as instance_id,"
." st.starts AS start,"
." st.ends AS end,"
." st.cue_in AS cue_in,"
@@ -527,7 +528,12 @@ public static function GetScheduledPlaylists($p_fromDateTime = null, $p_toDateTi
}
foreach ($items as $item){
-
+
+ $showInstance = CcShowInstancesQuery::create()->findPK($item["instance_id"]);
+ $showId = $showInstance->getDbShowId();
+ $show = CcShowQuery::create()->findPK($showId);
+ $showName = $show->getDbName();
+
$showEndDateTime = new DateTime($item["show_end"], $utcTimeZone);
$trackStartDateTime = new DateTime($item["start"], $utcTimeZone);
$trackEndDateTime = new DateTime($item["end"], $utcTimeZone);
@@ -559,7 +565,8 @@ public static function GetScheduledPlaylists($p_fromDateTime = null, $p_toDateTi
'cue_in' => Application_Model_DateHelper::CalculateLengthInSeconds($item["cue_in"]),
'cue_out' => Application_Model_DateHelper::CalculateLengthInSeconds($item["cue_out"]),
'start' => $start,
- 'end' => Application_Model_Schedule::AirtimeTimeToPypoTime($item["end"])
+ 'end' => Application_Model_Schedule::AirtimeTimeToPypoTime($item["end"]),
+ 'show_name' => $showName
);
}
@@ -421,8 +421,7 @@ def prepare_media(self, media):
try:
mediaKeys = sorted(media.iterkeys())
for mkey in mediaKeys:
- media_item = media[mkey]
- media_item['show_name'] = "TODO"
+ media_item = media[mkey]
except Exception, e:
self.logger.error("%s", e)

0 comments on commit d06b357

Please sign in to comment.