Compare commits

..

4 Commits

Author SHA1 Message Date
Elan Ruusamäe
29ac66b422 Add test data of movie without expiry date 2023-11-16 16:19:18 +02:00
Elan Ruusamäe
d92869bfe7
Update test data, cleanup None
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2023-11-16 15:59:57 +02:00
Elan Ruusamäe
e3182e5b9d
Update test data
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2023-11-16 15:59:22 +02:00
Elan Ruusamäe
2775f978bc
No longer include series related data in movies, also add release_year
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2023-11-16 15:59:02 +02:00

View File

@ -49,9 +49,8 @@ class DuoplayIE(InfoExtractor):
'series_id': '17', 'series_id': '17',
'season': 'Season 2', 'season': 'Season 2',
'season_number': 2, 'season_number': 2,
'episode': None,
'episode_number': None,
'episode_id': 14, 'episode_id': 14,
'release_year': 2010,
}, },
}, { }, {
'note': 'Movie', 'note': 'Movie',
@ -66,13 +65,22 @@ class DuoplayIE(InfoExtractor):
'cast': ['Jennifer Lawrence', 'Josh Hutcherson', 'Liam Hemsworth'], 'cast': ['Jennifer Lawrence', 'Josh Hutcherson', 'Liam Hemsworth'],
'upload_date': '20231109', 'upload_date': '20231109',
'timestamp': 1699552800, 'timestamp': 1699552800,
'series': 'Näljamängud', 'release_year': 2012,
'series_id': '4325', },
'season': 'Season 1', }, {
'season_number': 1, 'note': 'Movie without expiry',
'episode': 'Episode 0', 'url': 'https://duoplay.ee/5501/pilvede-all.-neljas-ode',
'episode_number': 0, 'md5': '7abf63d773a49ef7c39f2c127842b8fd',
'episode_id': 0, 'info_dict': {
'id': '5501',
'ext': 'mp4',
'title': 'Pilvede all. Neljas õde',
'thumbnail': r're:https://.+\.jpg(?:\?c=\d+)?$',
'description': 'md5:d86a70f8f31e82c369d4d4f4c79b1279',
'cast': ['Inga Lunge', 'Elisabet Reinsalu', 'Liis Haab', 'Rita Rätsepp', 'Ain Lutsepp', 'Indrek Sammul', 'Piret Rauk', 'Karin Tammaru', 'Guido Kangur'],
'upload_date': '20221214',
'timestamp': 1671054000,
'release_year': 2018,
}, },
}] }]
@ -89,19 +97,22 @@ class DuoplayIE(InfoExtractor):
return { return {
'id': video_id, 'id': video_id,
'title': episode_attr.get('title') if episode_attr.get('category') == 'movies' else (
traverse_obj(episode_attr, 'subtitle', ('episode_nr', {lambda x: f'Episode {x}' if x else None}), 'title')),
'formats': self._extract_m3u8_formats(video_player['manifest-url'], video_id, 'mp4'), 'formats': self._extract_m3u8_formats(video_player['manifest-url'], video_id, 'mp4'),
**traverse_obj(episode_attr, { **traverse_obj(episode_attr, {
'title': 'title',
'description': 'synopsis', 'description': 'synopsis',
'thumbnail': ('images', 'original'), 'thumbnail': ('images', 'original'),
'timestamp': ('airtime', {lambda x: unified_timestamp(x + ' +0200')}), 'timestamp': ('airtime', {lambda x: unified_timestamp(x + ' +0200')}),
'cast': ('cast', {lambda x: x.split(', ')}),
'release_year': ('year', {int_or_none}),
}),
**(traverse_obj(episode_attr, {
'title': (None, ('subtitle', ('episode_nr', {lambda x: f'Episode {x}' if x else None}))),
'series': 'title', 'series': 'title',
'series_id': ('telecast_id', {str_or_none}), 'series_id': ('telecast_id', {str_or_none}),
'season_number': ('season_id', {int_or_none}), 'season_number': ('season_id', {int_or_none}),
'episode': 'subtitle', 'episode': 'subtitle',
'episode_number': ('episode_nr', {int_or_none}), 'episode_number': ('episode_nr', {int_or_none}),
'episode_id': ('episode_id', {int_or_none}), 'episode_id': ('episode_id', {int_or_none}),
'cast': ('cast', {lambda x: x.split(', ')}), }, get_all=False) if episode_attr.get('category') != 'movies' else {}),
}),
} }