updated tests and docs
This commit is contained in:
parent
3df583f656
commit
a1c3d480c7
5 changed files with 21 additions and 20 deletions
|
|
@ -309,12 +309,12 @@ For example:
|
|||
.. code-block:: yaml
|
||||
:caption: subscription.yaml
|
||||
|
||||
tv_show:
|
||||
only_recent:
|
||||
[News]:
|
||||
TV Show Full Archive:
|
||||
= News:
|
||||
"Breaking News": "https://www.youtube.com/@SomeBreakingNews"
|
||||
|
||||
[Tech]:
|
||||
TV Show Only Recent:
|
||||
= Tech | TV-Y:
|
||||
"Two Minute Papers": "https://www.youtube.com/@TwoMinutePapers"
|
||||
|
||||
Will create two subscriptions named "Breaking News" and "Two Minute Papers", equivalent to:
|
||||
|
|
@ -323,8 +323,7 @@ Will create two subscriptions named "Breaking News" and "Two Minute Papers", equ
|
|||
|
||||
"Breaking News":
|
||||
preset:
|
||||
- "tv_show"
|
||||
- "only_recent"
|
||||
- "TV Show Full Archive"
|
||||
|
||||
overrides:
|
||||
subscription_indent_1: "News"
|
||||
|
|
@ -333,25 +332,30 @@ Will create two subscriptions named "Breaking News" and "Two Minute Papers", equ
|
|||
|
||||
"Two Minute Papers":
|
||||
preset:
|
||||
- "tv_show"
|
||||
- "TV Show Only Recent"
|
||||
|
||||
overrides:
|
||||
subscription_indent_1: "Tech"
|
||||
subscription_indent_2: "TV-Y"
|
||||
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]``.
|
||||
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 like so in your
|
||||
parent preset:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
presets:
|
||||
tv_show_name:
|
||||
"TV Show Preset":
|
||||
overrides:
|
||||
subscription_indent_1: "default-genre"
|
||||
subscription_indent_2: "default-content-rating"
|
||||
|
||||
tv_show_name: "{subscription_name}"
|
||||
url: "{subscription_value}"
|
||||
genre: "{subscription_indent_1}"
|
||||
content_rating: "{subscription_indent_2}"
|
||||
|
||||
.. _subscription value:
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ presets:
|
|||
# it applied to every TV show. Or, use them on the individual subscriptions.
|
||||
# - "add_subtitles"
|
||||
# - "sponsorblock"
|
||||
# - "include_info_json"
|
||||
|
||||
# To download age-restricted videos, you will need to uncomment and set your cookie
|
||||
# file here as a ytdl parameter. For more info, see
|
||||
|
|
@ -92,7 +91,8 @@ presets:
|
|||
# subtitles_name: "{episode_file_path}.{lang}.{subtitles_ext}"
|
||||
# subtitles_type: "srt"
|
||||
|
||||
languages: "en" # supports list of multiple languages
|
||||
languages:
|
||||
- "en"
|
||||
allow_auto_generated_subtitles: True # allow auto subtitles
|
||||
|
||||
####################################################################################################
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
# Global overrides for all subscriptions. Can either be set here or in your config.yaml
|
||||
__preset__:
|
||||
overrides:
|
||||
tv_show_directory: "/tv_shows"
|
||||
episode_title: "{upload_date_standardized} - {title}"
|
||||
episode_plot: "{webpage_url}"
|
||||
download_range: "2months"
|
||||
tv_show_directory: "/tv_shows" # Root folder of ytdl-sub TV Shows
|
||||
download_range: "2months" # Range to keep for only recent
|
||||
|
||||
|
||||
# All subscriptions under this will use the `TV Show Full Archive` preset
|
||||
TV Show Full Archive:
|
||||
# Sets "Music" as the TV show genre
|
||||
# Sets "Music" for genre
|
||||
= Music:
|
||||
"Rick A": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
|
||||
"Opeth": "https://www.youtube.com/channel/UCmQSJTFZaXN85gYk6W3XbdQ"
|
||||
|
||||
# Sets "Kids" as the TV show genre, and "TV-Y" as the content rating
|
||||
# Sets "Kids" for genre, "TV-Y" for content rating
|
||||
= Kids | TV-Y:
|
||||
"Jake Trains": "https://www.youtube.com/@JakeTrains"
|
||||
"Kids Toys Play": "https://www.youtube.com/@KidsToysPlayChannel"
|
||||
|
|
@ -27,7 +25,6 @@ TV Show Only Recent:
|
|||
|
||||
|
||||
# ADVANCED USAGE:
|
||||
# If a key is not a preset, it is treated as a subscription.
|
||||
# Subscriptions can use the same format as a preset found within a config.
|
||||
"Equivalent to BBC":
|
||||
preset:
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ from ytdl_sub.subscriptions.subscription import Subscription
|
|||
@pytest.fixture
|
||||
def recent_preset_dict(output_directory):
|
||||
return {
|
||||
"preset": "tv_show",
|
||||
"preset": "TV Show Full Archive",
|
||||
"date_range": {"after": "20150101"},
|
||||
"format": "worst[ext=mp4]", # download the worst format so it is fast
|
||||
"ytdl_options": {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from ytdl_sub.subscriptions.subscription import Subscription
|
|||
@pytest.fixture
|
||||
def channel_preset_dict(output_directory):
|
||||
return {
|
||||
"preset": "tv_show",
|
||||
"preset": "TV Show Full Archive",
|
||||
"format": "worst[ext=mp4]", # download the worst format so it is fast
|
||||
"ytdl_options": {
|
||||
"max_views": 100000, # do not download the popular PJ concert
|
||||
|
|
|
|||
Loading…
Reference in a new issue