Merge pull request #909 from paddatrapper/api-current-track

Fix live-info-v2 current track info
This commit is contained in:
Robb 2019-11-06 17:10:39 -05:00 committed by GitHub
commit 5ef9c9da95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -104,7 +104,10 @@ SQL;
$utcNow = new DateTime("now", new DateTimeZone("UTC"));
$shows = Application_Model_Show::getPrevCurrentNext($utcNow, $utcTimeEnd, $showsToRetrieve);
$currentShowID = (is_array($shows['currentShow'] && count($shows['currentShow'])>0))?$shows['currentShow']['instance_id']:null;
$currentShowID = null;
if (is_array($shows['currentShow']) && count($shows['currentShow'])>0) {
$currentShowID = $shows['currentShow']['instance_id'];
}
$source = self::_getSource();
$results = Application_Model_Schedule::getPreviousCurrentNextMedia($utcNow, $currentShowID, self::_getSource());