Skip to content

Commit 13f57cf

Browse files
committed
related to playlist resolve on remote sync, fix missing liveassist buttons when player is clone
1 parent ae9d725 commit 13f57cf

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.4.0-20260416
1+
5.4.0-20260603

models/playlists_model.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,6 @@ public function resolve($playlist_id, $player_id, $parent_player_id = false, $st
725725
$supports = ['audio','video','image','document'];
726726
}
727727

728-
729728
// TODO currently no player support for documents, but will be doing this at some point.
730729
$support_document = $player_id ? false : true;
731730

@@ -738,6 +737,20 @@ public function resolve($playlist_id, $player_id, $parent_player_id = false, $st
738737
// get parent player
739738
if ($parent_player_id) {
740739
$parent_player = $this->models->players('get_one', $parent_player_id);
740+
741+
// if using parent dynamic, then we override support with that of the parent
742+
if ($parent_player && $player['use_parent_dynamic']) {
743+
$supports = [];
744+
if ($parent_player['support_audio']) {
745+
$supports[] = 'audio';
746+
}
747+
if ($parent_player['support_video']) {
748+
$supports[] = 'video';
749+
}
750+
if ($parent_player['support_images']) {
751+
$supports[] = 'image';
752+
}
753+
}
741754
}
742755

743756
// figure out which media IDs to exclude based on dayparting

remote/ScheduleAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function run(): bool|object
159159

160160
// we are supposed to use a parent player for cache, but that player doesn't have the cached item yet.
161161
if (!$cache) {
162-
$media_items = $this->PlaylistsModel('resolve', $playlist['id'], $this->schedule_player_id, $player['parent_player_id'], $show_start, $show['duration']);
162+
$media_items = $this->PlaylistsModel('resolve', $playlist['id'], $this->schedule_player_id, $this->player->parent_player_id, $show_start, $show['duration']);
163163
$cache_created = time();
164164
$this->db->insert('shows_cache', [
165165
'player_id' => $this->cache_player_id,
@@ -427,7 +427,7 @@ private function add_liveassist_buttons($playlist_id, $show, $show_xml)
427427
$cache_created = $cache['created'];
428428
} else {
429429
*/
430-
$items = $this->PlaylistsModel('resolve', $button['button_playlist_id'], $this->player->id, false, $show_start);
430+
$items = $this->PlaylistsModel('resolve', $button['button_playlist_id'], $this->player->id, $this->player->parent_player_id, $show_start);
431431
$cache_created = time();
432432
// $showxml->addChild('last_updated',$cache_created);
433433
// $this->db->insert('schedules_liveassist_buttons_cache', array('player_id' => $this->player->id,'start' => $show['start'],'playlists_liveassist_button_id' => $button['id'],'data' => json_encode($items),'created' => $cache_created));

0 commit comments

Comments
 (0)