77 lines
3 KiB
YAML
77 lines
3 KiB
YAML
# This example shows how to download and format a Youtube video OR playlist
|
|
# to display in Kodi as a music video. Kodi requires music videos to be in
|
|
# a shared directory, so we will configure this to make the output directory
|
|
# formatted as:
|
|
#
|
|
# /path/to/Music Videos
|
|
# Elton John - Rocketman.jpg
|
|
# Elton John - Rocketman.mp4
|
|
# Elton John - Rocketman.nfo
|
|
# System of a Down - Chop Suey.jpg
|
|
# System of a Down - Chop Suey.mp4
|
|
# System of a Down - Chop Suey.nfo
|
|
# ...
|
|
#
|
|
configuration:
|
|
working_directory: '.ytdl-sub-downloads'
|
|
|
|
presets:
|
|
yt_music_video:
|
|
# A single YouTube video is our source/download strategy. However, this
|
|
# can be overwritten to download music videos from a "playlist", as we
|
|
# will see in a preset below
|
|
youtube:
|
|
download_strategy: "video"
|
|
|
|
# For advanced YTDL users only.
|
|
# It is wise to leave ignoreerrors=True to avoid errors for things
|
|
# like age-restricted videos in case you have not set your cookie.
|
|
ytdl_options:
|
|
ignoreerrors: True
|
|
|
|
# For each video downloaded, set the file and thumbnail name here.
|
|
# We set both with {music_video_name}, which is a variable we define in
|
|
# the overrides section further below to represent consistent naming format.
|
|
output_options:
|
|
output_directory: "{music_video_directory}"
|
|
file_name: "{music_video_name}.{ext}"
|
|
thumbnail_name: "{music_video_name}.jpg"
|
|
|
|
# For each video downloaded, add a music video NFO file for it. Populate it
|
|
# with tags that Kodi will read and use to display it in the music or music
|
|
# videos section.
|
|
nfo_tags:
|
|
nfo_name: "{music_video_name}.nfo"
|
|
nfo_root: "musicvideo"
|
|
tags:
|
|
artist: "{artist}"
|
|
title: "{track_title}"
|
|
album: "Music Videos"
|
|
year: "{upload_year}"
|
|
|
|
# Overrides is a section where we can define our own variables, and use them in
|
|
# any other section. We define our music video directory and episode file name
|
|
# here, which gets reused above for the video, thumbnail, and NFO file.
|
|
overrides:
|
|
music_video_directory: "path/to/Music Videos"
|
|
music_video_name: "{artist_sanitized} - {track_title_sanitized}"
|
|
|
|
# It is not always ideal to download all of an artist's music videos.
|
|
# Maybe you only like one song of theirs. We can reuse our preset above
|
|
# to download a single video instead.
|
|
yt_music_video_playlist:
|
|
preset: "yt_music_video"
|
|
youtube:
|
|
download_strategy: "playlist"
|
|
|
|
# Setting maintain_download_archive=True is generally a good thing to enable
|
|
# with playlists and channels because it will store previously downloaded
|
|
# video ids to tell YTDL not to re-download them on a successive invocation.
|
|
output_options:
|
|
maintain_download_archive: True
|
|
|
|
# Setting break_on_existing=True is also a good thing anytime you are using
|
|
# a download archive, because it will tell the downloader to stop trying
|
|
# to download videos that have already been downloaded.
|
|
ytdl_options:
|
|
break_on_existing: True
|