File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments