This commit is contained in:
jbannon 2022-05-15 23:27:07 +00:00
parent 3ec4c809e5
commit 0d8a4e3515

View file

@ -105,6 +105,8 @@ overrides
""""""""" """""""""
.. autoclass:: ytdl_sub.config.preset_options.Overrides() .. autoclass:: ytdl_sub.config.preset_options.Overrides()
.. _parent preset:
preset preset
"""""" """"""
Presets support inheritance by defining a parent preset: Presets support inheritance by defining a parent preset:
@ -166,7 +168,7 @@ Below is an example that downloads YouTube videos:
:caption: config.yaml :caption: config.yaml
presets: presets:
youtube_playlist_dl_example: playlist_preset_ex:
youtube: youtube:
download_strategy: "playlist" download_strategy: "playlist"
output_options: output_options:
@ -179,16 +181,16 @@ Below is an example that downloads YouTube videos:
:caption: subscription.yaml :caption: subscription.yaml
my_subscription_name: my_subscription_name:
preset: "youtube_playlist_dl_example" preset: "playlist_preset_ex"
youtube: youtube:
playlist_id: "UCsvn_Po0SmunchJYtttWpOxMg" playlist_id: "UCsvn_Po0SmunchJYtttWpOxMg"
overrides: overrides:
playlist_name: "diy-playlist" playlist_name: "diy-playlist"
Our preset uses the `YouTube Playlist`_ download strategy, and defines two Our preset ``playlist_preset_ex`` uses the `YouTube Playlist`_ download strategy, and defines two
custom variables: ``{output_directory}`` and ``{playlist_name}``. The subscription needs custom variables: ``{output_directory}`` and ``{playlist_name}``. The subscription sets
to define the ``playlist_id`` field and the ``{playlist_name}`` variable since the preset the `parent preset`_ to ``playlist_preset_ex``, and must define the ``playlist_id`` field and
did not define it. the ``{playlist_name}`` variable since the preset did not.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------