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

Code before:
    _DISCO_API_PARAMS = {
        'disco_host': 'ap2-prod-direct.discoveryplus.in',
        'realm': 'dplusindia',
        'country': 'in',
        'domain': 'https://www.discoveryplus.in/',
    }

    def _update_disco_api_headers(self, headers, disco_base, display_id, realm):
        headers.update({
            'x-disco-params': f'realm={realm}',
            'x-disco-client': f'WEB:UNKNOWN:{self._PRODUCT}:17.0.0',
            'Authorization': self._get_auth(disco_base, display_id, realm),
        })


class DiscoveryNetworksDeIE(DiscoveryPlusBaseIE):
    _VALID_URL = r'https?://(?:www\.)?(?P<domain>(?:tlc|dmax)\.de|dplay\.co\.uk)/(?:programme|show|sendungen)/(?P<programme>[^/]+)/(?:video/)?(?P<alternate_id>[^/]+)'

    _TESTS = [{
        'url': 'https://dmax.de/sendungen/goldrausch-in-australien/german-gold',
        'info_dict': {
            'id': '4756322',
            'ext': 'mp4',
            'title': 'German Gold',
            'description': 'md5:f3073306553a8d9b40e6ac4cdbf09fc6',
            'display_id': '4756322',
            'episode': 'Episode 1',
            'episode_number': 1,
            'season': 'Season 5',
            'season_number': 5,
            'series': 'Goldrausch in Australien',
            'duration': 2648.0,
            'upload_date': '20230517',
            'timestamp': 1684357500,
            'creators': ['DMAX'],
            'thumbnail': 'https://eu1-prod-images.disco-api.com/2023/05/09/f72fb510-7992-3b12-af7f-f16a2c22d1e3.jpeg',
            'tags': ['schatzsucher', 'schatz', 'nugget', 'bodenschätze', 'down under', 'australien', 'goldrausch'],
        },
        'params': {'skip_download': 'm3u8'},
    }, {
        'url': 'https://www.tlc.de/programme/breaking-amish/video/die-welt-da-drauen/DCB331270001100',
        'info_dict': {
            'id': '78867',
            'ext': 'mp4',
            'title': 'Die Welt da draußen',
            'description': 'md5:61033c12b73286e409d99a41742ef608',
            'timestamp': 1554069600,
            'upload_date': '20190331',
            'creator': 'TLC',
            'season': 'Season 1',
            'series': 'Breaking Amish',

Review comment (suggestion):
As the series/slug is not being passed into `_get_disco_api_info()` for the new case, the `display_id` has either to be re-created there by changing this in the returned dict:
```diff
-            'display_id': display_id,
+            'display_id': '/'.join(traverse_obj(video, (
+                (('included', ...), 'data'), 'attributes', 'alternateId', {strip_or_none}, filter)))
+            if display_id == video_id else display_id,
```
or just re-applied to the returned result (but that would only handle the DMAX case).
 
Then this value should be reverted and the test result for this new test should be have: 
```py
            'display_id': 'feuerwache-3-alarm-in-muenchen/24-stunden-auf-der-feuerwache-3',
```

Code after:
    _DISCO_API_PARAMS = {
        'disco_host': 'ap2-prod-direct.discoveryplus.in',
        'realm': 'dplusindia',
        'country': 'in',
        'domain': 'https://www.discoveryplus.in/',
    }

    def _update_disco_api_headers(self, headers, disco_base, display_id, realm):
        headers.update({
            'x-disco-params': f'realm={realm}',
            'x-disco-client': f'WEB:UNKNOWN:{self._PRODUCT}:17.0.0',
            'Authorization': self._get_auth(disco_base, display_id, realm),
        })


class DiscoveryNetworksDeIE(DiscoveryPlusBaseIE):
    _VALID_URL = r'https?://(?:www\.)?(?P<domain>(?:tlc|dmax)\.de)/(?:programme|show|sendungen)/(?P<programme>[^/?#]+)/(?:video/)?(?P<alternate_id>[^/?#]+)'

    _TESTS = [{
        'url': 'https://dmax.de/sendungen/goldrausch-in-australien/german-gold',
        'info_dict': {
            'id': '4756322',
            'ext': 'mp4',
            'title': 'German Gold',
            'description': 'md5:f3073306553a8d9b40e6ac4cdbf09fc6',
            'display_id': 'german-gold',
            'episode': 'Episode 1',
            'episode_number': 1,
            'season': 'Season 5',
            'season_number': 5,
            'series': 'Goldrausch in Australien',
            'duration': 2648.0,
            'upload_date': '20230517',
            'timestamp': 1684357500,
            'creators': ['DMAX'],
            'thumbnail': 'https://eu1-prod-images.disco-api.com/2023/05/09/f72fb510-7992-3b12-af7f-f16a2c22d1e3.jpeg',
            'tags': ['schatzsucher', 'schatz', 'nugget', 'bodenschätze', 'down under', 'australien', 'goldrausch'],
            'categories': ['Gold', 'Schatzsucher'],
        },
        'params': {'skip_download': 'm3u8'},
    }, {
        'url': 'https://www.tlc.de/programme/breaking-amish/video/die-welt-da-drauen/DCB331270001100',
        'info_dict': {
            'id': '78867',
            'ext': 'mp4',
            'title': 'Die Welt da draußen',
            'description': 'md5:61033c12b73286e409d99a41742ef608',
            'timestamp': 1554069600,
            'upload_date': '20190331',
            'creator': 'TLC',
            'season': 'Season 1',