docs(preset): Fix presets vs preset in config file

From [feedback](https://github.com/jmbannon/ytdl-sub/pull/1289#discussion_r2289960678).
This commit is contained in:
Ross Patterson 2025-08-21 00:19:33 -07:00
parent ca17441c57
commit bbb6603431
No known key found for this signature in database
GPG key ID: 2EFF7CCE6828E359

View file

@ -60,20 +60,21 @@ preset.
.. note:: .. note::
The ``presets:`` key at the top of the configuration file contains multiple The ``presets:`` key at the top of the configuration file contains multiple
user-defined presets, but *each preset* itself may include a ``presets:`` key that user-defined presets, but *each preset* itself may include a ``preset:`` key that
defines *that preset's* base presets. For example: defines *that preset's* base presets. For example:
.. code-block:: yaml .. code-block:: yaml
presets: presets:
Foo Preset: Foo Preset:
presets: preset:
- "Jellyfin TV Show by Date" - "Jellyfin TV Show by Date"
- "Only Recent"
presets preset
~~~~~~~ ~~~~~~
Presets support inheritance by defining a parent preset: Presets support inheritance by defining one or more parent presets:
.. code-block:: yaml .. code-block:: yaml
@ -83,11 +84,11 @@ Presets support inheritance by defining a parent preset:
parent_preset: parent_preset:
... ...
child_preset: child_preset:
preset: "parent_preset" preset:
- "parent_preset"
In the example above, ``child_preset`` inherits all fields defined in ``parent_preset``. In the example above, ``child_preset`` inherits all fields defined in ``parent_preset``.
It is advantageous to use parent presets where possible to reduce duplicate yaml Use parent presets where possible to reduce duplicate yaml definitions.
definitions.
Presets also support inheritance from multiple presets: Presets also support inheritance from multiple presets:
@ -106,8 +107,9 @@ which means:
- if two conflicting keys arent lists or mappings, overwrite the higher priority one - if two conflicting keys arent lists or mappings, overwrite the higher priority one
- otherwise, combine then re-evaluate - otherwise, combine then re-evaluate
If you are only inheriting from one preset, the syntax ``preset: "parent_preset"`` is If you are only inheriting from one preset, using a single string instead of a list is
valid YAML. Inheriting from multiple presets require use of a list. valid, for example ``preset: "parent_preset"``, but we recommend always using a list for
consistent readability between presets.
.. _`mergedeep`: .. _`mergedeep`:
https://mergedeep.readthedocs.io/en/latest/ https://mergedeep.readthedocs.io/en/latest/