CC-3623: Need to send show name to Liquidsoap. (Currently sending name as "TODO")

-fixed
This commit is contained in:
denise 2012-04-11 19:22:47 -04:00
parent 0ec58f0bc3
commit d06b3573e9
2 changed files with 10 additions and 4 deletions

View File

@ -412,6 +412,7 @@ class Application_Model_Schedule {
$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 @@ class Application_Model_Schedule {
}
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 @@ class Application_Model_Schedule {
'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
);
}

View File

@ -421,8 +421,7 @@ class PypoFetch(Thread):
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)