Skip to content

Commit cc9eca7

Browse files
committed
force no auto fade out last track for live assist playlist
1 parent ce57da5 commit cc9eca7

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

remote/ScheduleAction.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,20 @@ public function run(): bool|object
110110

111111
// add any playlist properties to xml
112112
$propertiesxml = $showxml->addChild('properties');
113-
if ($playlist['properties']) {
114-
foreach (json_decode($playlist['properties'], true) as $propertyKey => $propertyValue) {
115-
$propertiesxml->addChild($propertyKey, $propertyValue);
116-
}
113+
114+
$playlist_properties = json_decode($playlist['properties'], true);
115+
116+
if(!$playlist_properties) {
117+
$playlist_properties = [];
118+
}
119+
120+
if($show['type'] == 'live_assist') {
121+
// live assist shows don't have last track fadeout
122+
$playlist_properties['last_track_fadeout'] = 'never';
123+
}
124+
125+
foreach ($playlist_properties as $propertyKey => $propertyValue) {
126+
$propertiesxml->addChild($propertyKey, $propertyValue);
117127
}
118128

119129
// see if we have selected media in our cache.

0 commit comments

Comments
 (0)