mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-05 09:57:59 +09:00
[YoutubeDL] Add playlist_id and playlist_title fields (Fixes #4139)
This commit is contained in:
parent
3c6af203cc
commit
a1cf99d03a
@ -658,6 +658,8 @@ class YoutubeDL(object):
|
|||||||
extra = {
|
extra = {
|
||||||
'n_entries': n_entries,
|
'n_entries': n_entries,
|
||||||
'playlist': playlist,
|
'playlist': playlist,
|
||||||
|
'playlist_id': ie_result.get('id'),
|
||||||
|
'playlist_title': ie_result.get('title'),
|
||||||
'playlist_index': i + playliststart,
|
'playlist_index': i + playliststart,
|
||||||
'extractor': ie_result['extractor'],
|
'extractor': ie_result['extractor'],
|
||||||
'webpage_url': ie_result['webpage_url'],
|
'webpage_url': ie_result['webpage_url'],
|
||||||
|
@ -1043,6 +1043,7 @@ class YoutubePlaylistIE(YoutubeBaseInfoExtractor):
|
|||||||
'url': 'https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re',
|
'url': 'https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'title': 'ytdl test PL',
|
'title': 'ytdl test PL',
|
||||||
|
'id': 'PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re',
|
||||||
},
|
},
|
||||||
'playlist_count': 3,
|
'playlist_count': 3,
|
||||||
}, {
|
}, {
|
||||||
|
@ -490,10 +490,12 @@ def parseOpts(overrideArguments=None):
|
|||||||
'%(format_id)s for the unique id of the format (like Youtube\'s itags: "137"), '
|
'%(format_id)s for the unique id of the format (like Youtube\'s itags: "137"), '
|
||||||
'%(upload_date)s for the upload date (YYYYMMDD), '
|
'%(upload_date)s for the upload date (YYYYMMDD), '
|
||||||
'%(extractor)s for the provider (youtube, metacafe, etc), '
|
'%(extractor)s for the provider (youtube, metacafe, etc), '
|
||||||
'%(id)s for the video id, %(playlist)s for the playlist the video is in, '
|
'%(id)s for the video id, '
|
||||||
'%(playlist_index)s for the position in the playlist and %% for a literal percent. '
|
'%(playlist_title)s, %(playlist_id)s, or %(playlist)s (=title if present, ID otherwise) for the playlist the video is in, '
|
||||||
|
'%(playlist_index)s for the position in the playlist. '
|
||||||
'%(height)s and %(width)s for the width and height of the video format. '
|
'%(height)s and %(width)s for the width and height of the video format. '
|
||||||
'%(resolution)s for a textual description of the resolution of the video format. '
|
'%(resolution)s for a textual description of the resolution of the video format. '
|
||||||
|
'%% for a literal percent. '
|
||||||
'Use - to output to stdout. Can also be used to download to a different directory, '
|
'Use - to output to stdout. Can also be used to download to a different directory, '
|
||||||
'for example with -o \'/my/downloads/%(uploader)s/%(title)s-%(id)s.%(ext)s\' .'))
|
'for example with -o \'/my/downloads/%(uploader)s/%(title)s-%(id)s.%(ext)s\' .'))
|
||||||
filesystem.add_option(
|
filesystem.add_option(
|
||||||
|
Loading…
Reference in New Issue
Block a user