mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-26 21:59:08 +01:00
[ie/createacademy] adding file_prefix
This commit is contained in:
parent
39cf716ff1
commit
f4e5369330
1 changed files with 9 additions and 4 deletions
|
@ -18,7 +18,8 @@ class CreateAcademyIE(InfoExtractor):
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '265',
|
'id': '265',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Create Academy - s10e01 - Meet Dan',
|
'file_prefix': 'Create Academy - s10e01',
|
||||||
|
'title': 'Meet Dan',
|
||||||
'description': 'md5:48c8af37219020571a84d5f406e75d86',
|
'description': 'md5:48c8af37219020571a84d5f406e75d86',
|
||||||
'display_id': 'meet-dan',
|
'display_id': 'meet-dan',
|
||||||
'chapter': 'Introduction',
|
'chapter': 'Introduction',
|
||||||
|
@ -40,7 +41,8 @@ class CreateAcademyIE(InfoExtractor):
|
||||||
if lesson.get('id') == lesson_id:
|
if lesson.get('id') == lesson_id:
|
||||||
return {
|
return {
|
||||||
'section': section,
|
'section': section,
|
||||||
'title': prefix + str(lesson.get('number')).zfill(2) + ' - ' + lesson.get('title').strip(),
|
'file_prefix': prefix + str(lesson.get('number')).zfill(2),
|
||||||
|
'title': lesson.get('title').strip(),
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -49,7 +51,8 @@ class CreateAcademyIE(InfoExtractor):
|
||||||
'number': 0,
|
'number': 0,
|
||||||
'title': '',
|
'title': '',
|
||||||
},
|
},
|
||||||
'title': prefix + '00 - ' + traverse_obj(data, ('props', 'lesson', 'title')).strip(),
|
'file_prefix': 'Create Academy',
|
||||||
|
'title': traverse_obj(data, ('props', 'lesson', 'title')).strip(),
|
||||||
}
|
}
|
||||||
|
|
||||||
def _get_policy_key(self, data, video_id):
|
def _get_policy_key(self, data, video_id):
|
||||||
|
@ -103,6 +106,7 @@ class CreateAcademyIE(InfoExtractor):
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': str(createacademy_id),
|
'id': str(createacademy_id),
|
||||||
|
'file_prefix': lesson_metadata.get('file_prefix'),
|
||||||
'title': lesson_metadata.get('title'),
|
'title': lesson_metadata.get('title'),
|
||||||
'display_id': video_id,
|
'display_id': video_id,
|
||||||
'description': lesson.get('description'),
|
'description': lesson.get('description'),
|
||||||
|
@ -128,7 +132,8 @@ class CreateAcademyCourseIE(CreateAcademyIE):
|
||||||
'description': 'md5:48c8af37219020571a84d5f406e75d86',
|
'description': 'md5:48c8af37219020571a84d5f406e75d86',
|
||||||
'chapter_number': 1,
|
'chapter_number': 1,
|
||||||
'thumbnail': 'https://cf-images.eu-west-1.prod.boltdns.net/v1/static/6222962662001/22f75006-c49f-4d95-8673-1b60df4223d2/45d953e0-fa58-4cb6-9217-1c7b3c80c932/1280x720/match/image.jpg',
|
'thumbnail': 'https://cf-images.eu-west-1.prod.boltdns.net/v1/static/6222962662001/22f75006-c49f-4d95-8673-1b60df4223d2/45d953e0-fa58-4cb6-9217-1c7b3c80c932/1280x720/match/image.jpg',
|
||||||
'title': 'Create Academy - s10e01 - Meet Dan',
|
'file_prefix': 'Create Academy - s10e01',
|
||||||
|
'title': 'Meet Dan',
|
||||||
'display_id': 'meet-dan',
|
'display_id': 'meet-dan',
|
||||||
'chapter': 'Introduction',
|
'chapter': 'Introduction',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue