mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 01:02:13 +01:00
New option --no-write-playlist-metafiles to NOT write playlist metadata files
This commit is contained in:
parent
7c245ce877
commit
cac96421d9
3 changed files with 64 additions and 44 deletions
|
@ -378,6 +378,11 @@ ## Filesystem Options:
|
|||
--write-annotations Write video annotations to a
|
||||
.annotations.xml file
|
||||
--no-write-annotations Do not write video annotations (default)
|
||||
--write-playlist-metafiles Write playlist metadata in addition to the
|
||||
video metadata when using --write-info-json,
|
||||
--write-description etc. (default)
|
||||
--no-write-playlist-metafiles Do not write playlist metadata when using
|
||||
--write-info-json, --write-description etc.
|
||||
--get-comments Retrieve video comments to be placed in the
|
||||
.info.json file
|
||||
--load-info-json FILE JSON file containing the video information
|
||||
|
|
|
@ -206,6 +206,7 @@ class YoutubeDL(object):
|
|||
unless writeinfojson is also given
|
||||
writeannotations: Write the video annotations to a .annotations.xml file
|
||||
writethumbnail: Write the thumbnail image to a file
|
||||
allow_playlist_files: Also write playlists' description, infojson etc in a seperate file
|
||||
write_all_thumbnails: Write all thumbnail formats to files
|
||||
writelink: Write an internet shortcut file, depending on the
|
||||
current platform (.url/.webloc/.desktop)
|
||||
|
@ -1108,6 +1109,8 @@ def __process_playlist(self, ie_result, download):
|
|||
# We process each entry in the playlist
|
||||
playlist = ie_result.get('title') or ie_result.get('id')
|
||||
self.to_screen('[download] Downloading playlist: %s' % playlist)
|
||||
|
||||
if self.params.get('allow_playlist_files', True):
|
||||
ie_copy = {
|
||||
'playlist': playlist,
|
||||
'playlist_id': ie_result.get('id'),
|
||||
|
|
|
@ -937,6 +937,18 @@ def _dict_from_multiple_values_options_callback(
|
|||
'--no-write-annotations',
|
||||
action='store_false', dest='writeannotations',
|
||||
help='Do not write video annotations (default)')
|
||||
filesystem.add_option(
|
||||
'--write-playlist-metafiles',
|
||||
action='store_true', dest='allow_playlist_files', default=True,
|
||||
help=(
|
||||
'Write playlist metadata in addition to the video metadata '
|
||||
'when using --write-info-json, --write-description etc. (default)'))
|
||||
filesystem.add_option(
|
||||
'--no-write-playlist-metafiles',
|
||||
action='store_false', dest='allow_playlist_files',
|
||||
help=(
|
||||
'Do not write playlist metadata when using '
|
||||
'--write-info-json, --write-description etc.'))
|
||||
filesystem.add_option(
|
||||
'--get-comments',
|
||||
action='store_true', dest='getcomments', default=False,
|
||||
|
|
Loading…
Reference in a new issue