Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/thechosen.py (Python)

Code before:
                formats, subtitles = self._extract_m3u8_formats_and_subtitles(vurl, video_id)
                formats.extend(formats)
            elif ext == 'mpd':
                formats, subtitles = self._extract_mpd_formats_and_subtitles(vurl, video_id)
                subtitles.utend(formats)
                subtitles.update(subtitles)
            else:
                continue

        thumbnails = []
        if thumb_data := traverse_obj(metadata, ('thumbs'), ('thumbnails'), default=None):
            for _, thumb_url in thumb_data.items():
                if thumb_url is None:
                    continue
                thumbnails.append({'url': thumb_url})

        return {
            'id': video_id,
            **traverse_obj(metadata, ({
                'title': ('title'),
                'description': ('description'),
                'duration': ('duration'),
            })),
            'thumbnails': thumbnails,
            'formats': formats,
            'subtitles': self._merge_subtitles(subtitles),
        }


class TheChosenGroupIE(FrontroGroupBaseIE):
    _WORKING = False
    _CHANNEL_ID = '12884901895'
    _VIDEO_EXTRACTOR = TheChosenIE
    _VIDEO_URL_TMPL = 'https://watch.thechosen.tv/watch/%s'

    _VALID_URL = r'https?://(?:www\.)?watch\.thechosen\.tv/group/(?P<id>[0-9]+)'
    _TESTS = [{
        'url': 'https://watch.thechosen.tv/group/309237658592',
        'info_dict': {
            'id': '309237658592',
            'title': 'Season 3',
            'timestamp': 1746203969,
            'upload_date': '20250502',
            'modified_timestamp': int,
            'modified_date': str,
        },
        'playlist_count': 8,
    }]


Review comment (refactor):
see my above suggestion for how to properly use the `_merge_subtitles` helper
```suggestion
            'subtitles': subtitles,
```

Code after:
            elif ext == 'mpd':
                fmts, subs = self._extract_mpd_formats_and_subtitles(fmt_url, video_id, fatal=False)
            else:
                self.report_warning(f'Skipping unsupported format extension "{ext}"', video_id=video_id)
                continue
            formats.extend(fmts)
            self._merge_subtitles(subs, target=subtitles)

        thumbnails = []
        for thumb_id, thumb_url in traverse_obj(metadata, (
            ('thumbs', 'thumbnails'), {dict.items}, lambda _, v: url_or_none(v[1]),
        )):
            thumbnails.append({
                'id': thumb_id,
                'url': thumb_url,
            })

        return {
            'id': video_id,
            **traverse_obj(metadata, ({
                'title': ('title', {str}),
                'description': ('description', {str}),
                'duration': ('duration', {int_or_none}),
            })),
            'thumbnails': thumbnails,
            'formats': formats,
            'subtitles': subtitles,
        }


class TheChosenGroupIE(FrontroGroupBaseIE):
    _WORKING = False
    _CHANNEL_ID = '12884901895'
    _VIDEO_EXTRACTOR = TheChosenIE
    _VIDEO_URL_TMPL = 'https://watch.thechosen.tv/watch/%s'

    _VALID_URL = r'https?://(?:www\.)?watch\.thechosen\.tv/group/(?P<id>[0-9]+)'
    _TESTS = [{
        'url': 'https://watch.thechosen.tv/group/309237658592',
        'info_dict': {
            'id': '309237658592',
            'title': 'Season 3',
            'timestamp': 1746203969,
            'upload_date': '20250502',
            'modified_timestamp': int,
            'modified_date': str,
        },
        'playlist_count': 8,
    }]