ytdl-sub/examples/kodi_tv_shows_config.yaml
Jesse Bannon ee6706334f
ytdl_options defaults for each download strategy (#72)
* `ytdl_options` defaults for each download strategy

* fix docker, fix defaults getting added, add debugger test

* test playlist as well

* fix with hack

* fix full channel test

* existing
2022-06-14 00:03:01 -07:00

113 lines
No EOL
4.8 KiB
YAML

# This example shows how to download and format an entire Youtube channel
# to display in Kodi as a TV show. The directory format will look like
#
# /path/to/youtube_tv_shows/My Favorite Youtube Channel
# /Season 2021
# s2021.e0317 - St Pattys Day Video.jpg
# s2021.e0317 - St Pattys Day Video.mp4
# s2021.e0317 - St Pattys Day Video.nfo
# /Season 2022
# s2022.e1225 - Merry Christmas.jpg
# s2022.e1225 - Merry Christmas.mp4
# s2022.e1225 - Merry Christmas.nfo
# poster.jpg
# fanart.jpg
# tvshow.nfo
#
# The idea is to use dates as the numeric to represent season and episode
# numbers. Once downloaded, it can immediately be recognized by Kodi.
configuration:
working_directory: '.ytdl-sub-downloads'
presets:
###############################################################################
# FULL ARCHIVE
# This preset will download every single video in a YouTube channel.
yt_channel_as_tv:
# YouTube channels are our source/download strategy
# Use the channel avatar and banner images for Kodi
youtube:
download_strategy: "channel"
channel_avatar_path: "poster.jpg"
channel_banner_path: "fanart.jpg"
# For advanced YTDL users only; any YTDL parameter can be set here.
# To download age-restricted videos, you will need to set your cookie
# file here as a ytdl parameter. For more info, see
# https://ytdl-sub.readthedocs.io/en/latest/faq.html#download-age-restricted-youtube-videos
#
# ytdl_options:
# cookiefile: "path/to/cookie_file.txt
# For each video downloaded, set the file and thumbnail name here.
# We set both with {episode_name}, which is a variable we define in
# the overrides section further below to represent our date-like episode
# naming convention. Using override variables helps reduce copy-paste.
#
# Another field worth mentioning is maintain_download_archive=True. This
# is generally a good thing to enable with channels because it will
# store previously downloaded video ids to tell YTDL not to re-download
# them on a successive invocation.
output_options:
output_directory: "{youtube_tv_shows_directory}/{tv_show_name_sanitized}"
file_name: "{episode_name}.{ext}"
thumbnail_name: "{episode_name}.jpg"
maintain_download_archive: True
# For each video downloaded, add an episode NFO file for it. We give it
# the same date-like episode name using our {episode_name} variable, and
# populate the NFO with available video metadata that Kodi will recognize.
nfo_tags:
nfo_name: "{episode_name}.nfo"
nfo_root: "episodedetails"
tags:
title: "{title}"
season: "{upload_year}"
episode: "{upload_month}{upload_day_padded}"
plot: "{description}"
year: "{upload_year}"
aired: "{upload_date_standardized}"
# In the output directory, create a tvshow.nfo file. Kodi looks for this
# in the root of the TV show directory to get the TV show (title) name.
output_directory_nfo_tags:
nfo_name: "tvshow.nfo"
nfo_root: "tvshow"
tags:
title: "{tv_show_name}"
# Overrides is a section where we can define our own variables, and use them in
# any other section. We define our tv show directory and episode file name here,
# which gets reused above for the video, thumbnail, and NFO file.
overrides:
youtube_tv_shows_directory: "/path/to/youtube_tv_shows"
episode_name: "Season {upload_year}/s{upload_year}.e{upload_month_padded}{upload_day_padded} - {title_sanitized}"
###############################################################################
# RECENT ARCHIVE
# This preset shows how you can download just the last 14 days-worth of videos
# on each download invocation.
yt_channel_as_tv__recent:
# `preset` can be set to any other preset in the config, and will inherit all its defined fields.
# This helps reduce copy-paste in the config.yaml
preset: "yt_channel_as_tv"
# We will add the `after` field onto `yt_channel_as_tv`'s YouTube channel download strategy.
# This is saying 'only download videos uploaded in the last 2 weeks'
youtube:
after: "today-2weeks"
###############################################################################
# ROLLING ARCHIVE
# This example shows how to only keep the last 14-days worth of videos, and
# delete the rest.
yt_channel_as_tv__only_recent:
# Reuse `yt_channel_as_tv__recent` to only download the last 2 weeks' of videos
preset: "yt_channel_as_tv__recent"
# This is saying "only keep files if they were uploaded in the last 2 weeks".
# All other files that this subscription had previously downloaded will be
# deleted.
output_options:
keep_files_after: "today-2weeks"