docker looking good now

This commit is contained in:
jbannon 2022-05-20 19:35:33 +00:00
parent 9ca1d132c4
commit 6295f78eb8
6 changed files with 80 additions and 90 deletions

16
docker/docker-compose.yml Normal file
View file

@ -0,0 +1,16 @@
version: "2.1"
services:
ytdl-sub:
image: ytdl-sub:latest
container_name: ytdl-sub
environment:
- PUID=1000
- PGID=1000
- TZ=America/Los_Angeles
volumes:
- <path/to/ytdl-sub/config>:/config
- <path/to/tv_shows>:/tv_shows # optional
- <path/to/movies>:/movies # optional
- <path/to/music_videos>:/music_videos # optional
- <path/to/music>:/music # optional
restart: unless-stopped

View file

@ -2,79 +2,52 @@ configuration:
working_directory: '/tmp/ytdl-sub-downloads'
# All example presets are included in this default config.yaml,
# feel free to change it as you see fit.
# feel free to change it as you see fit. For a detailed explanation
# of the examples, see https://ytdl-sub.readthedocs.io/en/latest/examples.html
presets:
yt_music_video_playlist:
youtube:
download_strategy: "playlist"
ytdl_options:
ignoreerrors: True
output_options:
output_directory: "{music_video_directory}"
file_name: "{music_video_name}.{ext}"
thumbnail_name: "{music_video_name}.jpg"
maintain_download_archive: True
convert_thumbnail:
to: "jpg"
nfo_tags:
nfo_name: "{music_video_name}.nfo"
nfo_root: "musicvideo"
tags:
artist: "{artist}"
title: "{title}"
album: "Music Videos"
year: "{upload_year}"
overrides:
music_video_directory: "path/to/Music Videos"
music_video_name: "{sanitized_artist} - {sanitized_title}"
yt_music_video:
preset: "yt_music_video_playlist"
youtube:
download_strategy: "video"
yt_channel_as_tv:
#############################################################################
# Downloads single videos and stores them as Kodi/Jellyfin/Emby music videos,
# which all live in a single directory.
yt_music_video:
youtube:
download_strategy: "channel"
channel_avatar_path: "poster.jpg"
channel_banner_path: "fanart.jpg"
download_strategy: "video"
ytdl_options:
ignoreerrors: True
output_options:
output_directory: "{youtube_tv_shows_directory}/{sanitized_tv_show_name}"
file_name: "{episode_name}.{ext}"
thumbnail_name: "{episode_name}.jpg"
maintain_download_archive: True
output_directory: "{music_video_directory}"
file_name: "{music_video_name}.{ext}"
thumbnail_name: "{music_video_name}.jpg"
convert_thumbnail:
to: "jpg"
nfo_tags:
nfo_name: "{episode_name}.nfo"
nfo_root: "episodedetails"
nfo_name: "{music_video_name}.nfo"
nfo_root: "musicvideo"
tags:
artist: "{artist}"
title: "{title}"
season: "{upload_year}"
episode: "{upload_month}{upload_day_padded}"
plot: "{description}"
album: "Music Videos"
year: "{upload_year}"
aired: "{upload_date_standardized}"
output_directory_nfo_tags:
nfo_name: "tvshow.nfo"
nfo_root: "tvshow"
tags:
title: "{tv_show_name}"
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} - {sanitized_title}"
music_video_directory: "/music_videos"
music_video_name: "{sanitized_artist} - {sanitized_title}"
# artist: # FILL THIS OUT IN THE SUBSCRIPTION
yt_channel_as_tv__recent:
preset: "yt_channel_as_tv"
#############################################################################
# Downloads playlists and stores all videos as Kodi/Jellyfin/Emby music
# videos, which all live in a single directory.
yt_music_video_playlist:
preset: "yt_music_video"
youtube:
after: "today-2weeks"
ytdl_options:
break_on_reject: True
break_on_existing: True
download_strategy: "playlist"
yt_channel_as_tv__only_recent:
preset: "yt_channel_as_tv__recent"
output_options:
keep_files_after: "today-2weeks"
maintain_download_archive: True
ytdl_options:
break_on_existing: True

View file

@ -1,13 +1,7 @@
#recent_channel_test:
# preset: "yt_channel"
# ytdl_options:
# break_on_reject: True
# youtube:
# channel_id: "UCsvn_Po0SmunchJYOWpOxMg"
# after: today-13days
# output_options:
# output_directory: "/tmp/dunkey"
# keep_files:
# after: today-3days
# overrides:
# tv_show_name: "Youtube: Dunkey"
rammstein_music_videos:
preset: "yt_music_video_playlist"
youtube:
playlist_id: "PLVTLbc6i-h_iuhdwUfuPDLFLXG2QQnz-x"
overrides:
artist: "Rammstein"

View file

@ -16,12 +16,12 @@ configuration:
working_directory: '.ytdl-sub-downloads'
presets:
yt_music_video_playlist:
# Youtube playlists are our source/download strategy. However, this
# can be overwritten to download music videos from a 'channel' or a
# single 'video'
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: "playlist"
download_strategy: "video"
# For advanced YTDL users only.
# It is wise to leave ignoreerrors=True to avoid errors for things
@ -32,16 +32,10 @@ presets:
# 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.
#
# Another field worth mentioning is maintain_download_archive=True. This
# is generally a good thing to enable with playlists because it will
# store previously downloaded video ids to tell YTDL not to re-download
# them on a successive invocation.
output_options:
output_directory: "{music_video_directory}"
output_directory: "{music_video_directory}/{sanitized_artist}"
file_name: "{music_video_name}.{ext}"
thumbnail_name: "{music_video_name}.jpg"
maintain_download_archive: True
# Always convert the video thumbnail to jpg
# TODO: always convert all thumbnails to jpg in code
@ -70,7 +64,19 @@ presets:
# 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:
preset: "yt_music_video_playlist"
yt_music_video_playlist:
preset: "yt_music_video"
youtube:
download_strategy: "video"
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

View file

@ -1,4 +1,4 @@
from setuptools import setup
if __name__ == '__main__':
if __name__ == "__main__":
setup()

View file

@ -59,8 +59,9 @@ def _download_subscription_from_cli(config: ConfigFile, extra_args: List[str]) -
def main():
"""Entrypoint for ytdl-subscribe"""
"""
Entrypoint for ytdl-subscribe
"""
# If no args are provided, print help and exit
if len(sys.argv) < 2:
parser.print_help()