When live streaming to LibreTime on ports 8001 or 8002, the MVC interface would break (500)

I've found this is because of ScheduleController L305, introduced recently in 45dbf84750
A simple if clause allows us to workaround the issue, which must be that live streams don't have pictures nor metadata...
Fixes #919
This commit is contained in:
Roberto Soto 2019-11-22 21:01:39 -08:00
parent 5ef9c9da95
commit 556d4eb7b9
1 changed files with 4 additions and 2 deletions

View File

@ -302,8 +302,10 @@ class ScheduleController extends Zend_Controller_Action
$range["previous"]["ends"] = Application_Common_DateHelper::UTCStringToUserTimezoneString($range["previous"]["ends"]);
}
if (isset($range["current"])) {
$get_artwork = FileDataHelper::getArtworkData($range["current"]["metadata"]["artwork"], 256);
$range["current"]["metadata"]["artwork_data"] = $get_artwork;
if (isset($range["current"]["metadata"])) {
$get_artwork = FileDataHelper::getArtworkData($range["current"]["metadata"]["artwork"], 256);
$range["current"]["metadata"]["artwork_data"] = $get_artwork;
}
$range["current"]["starts"] = Application_Common_DateHelper::UTCStringToUserTimezoneString($range["current"]["starts"]);
$range["current"]["ends"] = Application_Common_DateHelper::UTCStringToUserTimezoneString($range["current"]["ends"]);
}