ytdl-sub/examples/kodi_tv_shows_subscriptions.yaml
2022-04-23 08:04:47 +00:00

81 lines
No EOL
3.2 KiB
YAML

# This example shows how we can use the `kodi_tv_shows_config.yaml` preset
# to download channels in a few different ways. We will use made-up channels
# in each example.
###############################################################################
# LEVEL 1 - FULL ARCHIVE
# Subscription names are defined by you. We will call this one
# john_smith_archive because it will download every single video in
# john_smith's channel.
john_smith_archive:
# We must define a preset to use from our config. We named the one in the
# config example "yt_channel_as_tv", so set that here.
preset: "yt_channel_as_tv"
# Our download strategy was Youtube channels. Define the channel id here
# in our subscription.
youtube:
channel_id: "UCsvn_Po0SmunchJYtttWpOxMg"
# Overrides can be defined per-subscription. If you noticed, we used
# {tv_show_name} and {sanitized_tv_show_name} in our "yt_channel_as_tv"
# preset. We intended to reserve that variable to be defined for each
# individual subscription. Each override defined here will create a
# 'sanitized_' version that is safe for file systems.
overrides:
tv_show_name: "John /\ Smith"
###############################################################################
# LEVEL 2 - RECENT ARCHIVE
# It is not always ideal to go full datahoarder on a channel's videos.
# This example shows how you can only download the last 14 days-worth
# of videos on each download invocation.
#
# The only difference between this example and the one above is
# - youtube.after
# This is saying 'only download videos in the last 14 days'
# - ytdl_options.break_on_reject
# This is getting into YTDL voodoo. By default, YTDL will try to
# download all channel videos beginning with the most recent one.
# By setting break_on_reject, we will break this full-download on
# the first video that gets rejected. Since we have youtube.after
# defined, all videos after today-14days will be rejected. Therefore,
# the first video that is out of range that it tries to download, it
# will stop there, and save a significant amount of time.
john_smith_recent_archive:
preset: "yt_channel_as_tv"
youtube:
channel_id: "UCsvn_Po0SmunchJYtttWpOxMg"
after: today-14days
overrides:
tv_show_name: "John /\ Smith"
ytdl_options:
break_on_reject: True
###############################################################################
# LEVEL 3 - ROLLING ARCHIVE
# If you put the recent archive example in a cron job, then in a year or so
# you will basically be datahoarding that channel unless you manually delete
# old videos. We automate because we are lazy. This example shows how to
# only keep the last 14-days worth of videos, and delete the rest.
#
# The only difference between this example and the one above is
# - output_options.keep_files.after
# This is saying "only keep files if they were uploaded in the last 14 days".
# All other files that this subscription had previously downloaded will be
# deleted.
john_smith_rolling_archive:
preset: "yt_channel_as_tv"
youtube:
channel_id: "UCsvn_Po0SmunchJYtttWpOxMg"
after: today-14days
overrides:
tv_show_name: "John /\ Smith"
ytdl_options:
break_on_reject: True
output_options:
keep_files:
after: today-14days