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

Code before:
        },
        'playlist_count': 19,
    }]

    def _real_extract(self, url):
        album_display_id: str = self._match_id(url)
        album_info: dict = self._download_json(f'https://api.idagio.com/v2.0/metadata/albums/{album_display_id}',
                                               album_display_id).get('result')

        track_ids: list[int] = traverse_obj(album_info, ('tracks', ..., 'id'))

        return {
            '_type': 'playlist',
            'display_id': album_display_id,
            'entries': [self.url_result(f'https://api.idagio.com/v2.0/metadata/tracks/{track_id}',
                                        ie='IdagioTrack', video_id=track_id, track_number=i)
                        for i, track_id in enumerate(track_ids, start=1)],
            **traverse_obj(album_info, {
                'id': ('id', {str}),
                'title': ('title', {str}),
                'timestamp': ('publishDate', {unified_timestamp}),
                'modified_timestamp': ('lastModified', {unified_timestamp}),
                'thumbnail': ('imageUrl', {url_or_none}),
                'description': ('description', {str}),
                'artists': ('participants', ..., 'name', {str}, all),
                'tags': ('tags', {list}),
            }),
        }


class IdagioPlaylistIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.)?app\.idagio\.com/playlists/(?!personal/)(?P<id>[a-zA-Z0-9\-]+)\??.*'
    _TESTS = [{
        'url': 'https://app.idagio.com/playlists/beethoven-the-most-beautiful-piano-music',
        'info_dict': {
            'id': '31652bec-8c5b-460e-a3f0-cf1f69817f53',
            'display_id': 'beethoven-the-most-beautiful-piano-music',
            'title': 'Beethoven: the most beautiful piano music',
            'description': 'md5:d41bb04b8896bb69377f5c2cd9345ad1',
            'thumbnail': 'https://idagio-images.global.ssl.fastly.net/playlists/31652bec-8c5b-460e-a3f0-cf1f69817f53/main.jpg?_alt=sys/ph/artist-default.jpg',
            'creators': ['IDAGIO'],
        },
        'playlist_count': 17,
    }]

    def _real_extract(self, url):
        playlist_display_id: str = self._match_id(url)
        playlist_info: dict = self._download_json(f'https://api.idagio.com/v2.0/playlists/{playlist_display_id}',
                                                  playlist_display_id).get('result')

        track_ids: list[int] = traverse_obj(playlist_info, ('tracks', ..., 'id'))

Review comment (suggestion):
You can expand and check individual types like so
```suggestion
                'tags': ('tags', ..., {str}),
```

Code after:
        'url': 'https://app.idagio.com/albums/elgar-enigma-variations-in-the-south-serenade-for-strings',
        'info_dict': {
            'id': 'a9f139b8-f70d-4b8a-a9a4-5fe8d35eaf9c',
            'display_id': 'elgar-enigma-variations-in-the-south-serenade-for-strings',
            'title': 'Elgar: Enigma Variations, In the South, Serenade for Strings',
            'description': '',
            'thumbnail': 'https://idagio-images.global.ssl.fastly.net/albums/880040420521/main.jpg',
            'artists': ['Vasily Petrenko', 'Royal Liverpool Philharmonic Orchestra', 'Edward Elgar'],
            'timestamp': 1553817600,
            'upload_date': '20190329',
            'modified_timestamp': 1562566559.0,
            'modified_date': '20190708',
        },
        'playlist_count': 19,
    }, {
        'url': 'https://app.idagio.com/albums/brahms-ein-deutsches-requiem-3B403DF6-62D7-4A42-807B-47173F3E0192',
        'info_dict': {
            'id': '2862ad4e-4a61-45ad-9ce4-7fcf0c2626fe',
            'display_id': 'brahms-ein-deutsches-requiem-3B403DF6-62D7-4A42-807B-47173F3E0192',
            'title': 'Brahms: Ein deutsches Requiem',
            'description': '',
            'thumbnail': 'https://idagio-images.global.ssl.fastly.net/albums/3149020954522/main.jpg',
            'tags': ['recent-release'],
            'artists': ['Sabine Devieilhe', 'Stéphane Degout', 'Raphaël Pichon', 'Pygmalion', 'Johannes Brahms'],
            'timestamp': 1760054400,
            'upload_date': '20251010',
            'modified_timestamp': 1760101611,
            'modified_date': '20251010',
        },
        'playlist_count': 7,
    }]
    _API_URL_TMPL = 'https://api.idagio.com/v2.0/metadata/albums/{}'
    _PLAYLIST_ID_KEY = 'display_id'

    def _parse_playlist_metadata(self, playlist_info):
        return traverse_obj(playlist_info, {
            'id': ('id', {str}),
            'title': ('title', {str}),
            'timestamp': ('publishDate', {unified_timestamp}),
            'modified_timestamp': ('lastModified', {unified_timestamp}),
            'thumbnail': ('imageUrl', {url_or_none}),
            'description': ('description', {str}),
            'artists': ('participants', ..., 'name', {str}),
            'tags': ('tags', ..., {str}),
        })


class IdagioPlaylistIE(IdagioPlaylistBaseIE):
    _VALID_URL = r'https?://(?:www\.)?app\.idagio\.com/playlists/(?!personal/)(?P<id>[\w-]+)'
    _TESTS = [{
        'url': 'https://app.idagio.com/playlists/beethoven-the-most-beautiful-piano-music',