mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-27 06:10:38 +01:00
[disney] provide episode_number and season_number for some series
This commit is contained in:
parent
5215f45327
commit
6bb5f07c53
|
@ -150,7 +150,7 @@ class DisneyIE(InfoExtractor):
|
|||
}.get(caption_format, caption_format),
|
||||
})
|
||||
|
||||
return {
|
||||
metadata = {
|
||||
'id': video_id,
|
||||
'title': title,
|
||||
'description': video_data.get('description') or video_data.get('short_desc'),
|
||||
|
@ -160,3 +160,16 @@ class DisneyIE(InfoExtractor):
|
|||
'formats': formats,
|
||||
'subtitles': subtitles,
|
||||
}
|
||||
|
||||
externals = video_data.get('externals', {})
|
||||
if len(externals) > 0:
|
||||
data_pack = externals[0].get('data', {})
|
||||
if data_pack:
|
||||
season_number = int_or_none(data_pack.get('Season', None))
|
||||
episode_number = int_or_none(data_pack.get('Episode', None))
|
||||
if season_number:
|
||||
metadata['season_number'] = season_number
|
||||
if episode_number:
|
||||
metadata['episode_number'] = episode_number
|
||||
|
||||
return metadata
|
||||
|
|
Loading…
Reference in New Issue
Block a user