ytdl-sub/src/ytdl_sub/validators
Jesse Bannon c255f40348
[FEATURE] Subscription nesting (#747)
Closes Feature Request: https://github.com/jmbannon/ytdl-sub/issues/743

Subscriptions support using presets as keys, and using keys to set override variables as values.
For example:

```
tv_show:
  only_recent:
    [News]:
      "Breaking News": "https://www.youtube.com/@SomeBreakingNews"

  [Tech]:
    "Two Minute Papers": "https://www.youtube.com/@TwoMinutePapers"
```
Will create two subscriptions named "Breaking News" and "Two Minute Papers", equivalent to:

```
"Breaking News":
  preset:
    - "tv_show"
    - "only_recent"

  overrides:
    subscription_indent_1: "News"
    subscription_name: "Breaking News"
    subscription_value: "https://www.youtube.com/@SomeBreakingNews"

"Two Minute Papers":
  preset:
    - "tv_show"

  overrides:
    subscription_indent_1: "Tech"
    subscription_name: "Two Minute Papers"     subscription_value: "https://www.youtube.com/@TwoMinutePapers"
```

You can provide as many parent presets in the form of keys, and subscription indents as ``[keys]``.
This can drastically simplify subscription definitions by setting things you want configurable like so in your
parent preset:

```
presets:
  tv_show_name:
    overrides:
      tv_show_name: "{subscription_name}"
      url: "{subscription_value}"
      genre: "{subscription_indent_1}"
```

NOTE!!!
Changing your subscription name from 'legacy' subscriptions will need their download archive file migrated to a new name. A future update will assist in this migration process. Either wait until then or, if you consider yourself a ytdl-sub expert, keep a backup of your subscription file before migrating.
2023-10-02 16:07:48 -07:00
..
__init__.py setup cfg 2022-04-26 07:19:53 +00:00
audo_codec_validator.py [FEATURE] Support best codec type in audio_extract (#700) 2023-09-02 00:50:26 -07:00
file_path_validators.py [FEATURE] Configurable file_name_max_bytes (#562) 2023-03-25 20:17:38 -07:00
nfo_validators.py [BACKEND] output_directory_nfo_tags to support source vars (#239) 2022-09-17 11:11:37 -07:00
regex_validator.py [FEATURE] Chapters plugin with SponsorBlock support (#178) 2022-08-15 17:01:03 -07:00
source_variable_validator.py [FEATURE] Regex capture and filtering on source variables plugin (#100) 2022-07-16 23:39:46 -07:00
strict_dict_validator.py [FEATURE] Subtitles support via Subtitles plugin (#169) 2022-08-12 09:58:08 -07:00
string_datetime.py [DOCS] Lowest date_range granularity is day (#451) 2023-02-20 10:40:28 -08:00
string_formatter_validators.py [BACKEND] Properly sanitize recursive variables (#477) 2023-02-25 09:35:41 -08:00
string_select_validator.py setup cfg 2022-04-26 07:19:53 +00:00
validators.py [FEATURE] Subscription nesting (#747) 2023-10-02 16:07:48 -07:00