Skip to content

Commit bb2b3da

Browse files
committed
chore: Make sure to skip missing for EPG map
1 parent 3778852 commit bb2b3da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/Jobs/MapPlaylistChannelsToEpgChunk.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,18 @@ public function handle(): void
6767
// Process each channel
6868
$patterns = $this->settings['exclude_prefixes'] ?? [];
6969
$useRegex = $this->settings['use_regex'] ?? false;
70+
$skipMissing = $this->settings['skip_missing'] ?? false;
7071
$mappedChannels = [];
7172

7273
foreach ($channels->cursor() as $channel) {
7374
// Get the title and stream id - sanitize UTF-8 immediately
7475
$streamId = $this->sanitizeUtf8(trim($channel->stream_id_custom ?? $channel->stream_id));
76+
77+
if ($skipMissing && empty($streamId)) {
78+
// Skip channels without stream ID if the setting is enabled
79+
continue;
80+
}
81+
7582
$name = $this->sanitizeUtf8(trim($channel->name_custom ?? $channel->name));
7683
$title = $this->sanitizeUtf8(trim($channel->title_custom ?? $channel->title));
7784

0 commit comments

Comments
 (0)