We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db139a5 commit 70e063fCopy full SHA for 70e063f
app/Jobs/MergeChannels.php
@@ -227,6 +227,14 @@ protected function filterDisabledGroups($group)
227
*/
228
protected function selectMasterByWeightedScore($group, array $playlistPriority)
229
{
230
+ // Enforce prefer catch-up as primary if enabled
231
+ if ($this->preferCatchupAsPrimary) {
232
+ $catchupChannels = $group->filter(fn ($channel) => ! empty($channel->catchup));
233
+ if ($catchupChannels->isNotEmpty()) {
234
+ $group = $catchupChannels;
235
+ }
236
237
+
238
$scoredChannels = $group->map(function ($channel) use ($playlistPriority) {
239
return [
240
'channel' => $channel,
0 commit comments