docker looking good now
This commit is contained in:
parent
9ca1d132c4
commit
6295f78eb8
6 changed files with 80 additions and 90 deletions
16
docker/docker-compose.yml
Normal file
16
docker/docker-compose.yml
Normal 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
|
||||||
|
|
@ -2,79 +2,52 @@ configuration:
|
||||||
working_directory: '/tmp/ytdl-sub-downloads'
|
working_directory: '/tmp/ytdl-sub-downloads'
|
||||||
|
|
||||||
# All example presets are included in this default config.yaml,
|
# 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:
|
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"
|
# Downloads single videos and stores them as Kodi/Jellyfin/Emby music videos,
|
||||||
youtube:
|
# which all live in a single directory.
|
||||||
download_strategy: "video"
|
yt_music_video:
|
||||||
|
|
||||||
yt_channel_as_tv:
|
|
||||||
youtube:
|
youtube:
|
||||||
download_strategy: "channel"
|
download_strategy: "video"
|
||||||
channel_avatar_path: "poster.jpg"
|
|
||||||
channel_banner_path: "fanart.jpg"
|
|
||||||
ytdl_options:
|
ytdl_options:
|
||||||
ignoreerrors: True
|
ignoreerrors: True
|
||||||
|
|
||||||
output_options:
|
output_options:
|
||||||
output_directory: "{youtube_tv_shows_directory}/{sanitized_tv_show_name}"
|
output_directory: "{music_video_directory}"
|
||||||
file_name: "{episode_name}.{ext}"
|
file_name: "{music_video_name}.{ext}"
|
||||||
thumbnail_name: "{episode_name}.jpg"
|
thumbnail_name: "{music_video_name}.jpg"
|
||||||
maintain_download_archive: True
|
|
||||||
convert_thumbnail:
|
convert_thumbnail:
|
||||||
to: "jpg"
|
to: "jpg"
|
||||||
|
|
||||||
nfo_tags:
|
nfo_tags:
|
||||||
nfo_name: "{episode_name}.nfo"
|
nfo_name: "{music_video_name}.nfo"
|
||||||
nfo_root: "episodedetails"
|
nfo_root: "musicvideo"
|
||||||
tags:
|
tags:
|
||||||
|
artist: "{artist}"
|
||||||
title: "{title}"
|
title: "{title}"
|
||||||
season: "{upload_year}"
|
album: "Music Videos"
|
||||||
episode: "{upload_month}{upload_day_padded}"
|
|
||||||
plot: "{description}"
|
|
||||||
year: "{upload_year}"
|
year: "{upload_year}"
|
||||||
aired: "{upload_date_standardized}"
|
|
||||||
output_directory_nfo_tags:
|
|
||||||
nfo_name: "tvshow.nfo"
|
|
||||||
nfo_root: "tvshow"
|
|
||||||
tags:
|
|
||||||
title: "{tv_show_name}"
|
|
||||||
overrides:
|
overrides:
|
||||||
youtube_tv_shows_directory: "/path/to/youtube_tv_shows"
|
music_video_directory: "/music_videos"
|
||||||
episode_name: "Season {upload_year}/s{upload_year}.e{upload_month_padded}{upload_day_padded} - {sanitized_title}"
|
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:
|
youtube:
|
||||||
after: "today-2weeks"
|
download_strategy: "playlist"
|
||||||
ytdl_options:
|
|
||||||
break_on_reject: True
|
|
||||||
break_on_existing: True
|
|
||||||
|
|
||||||
yt_channel_as_tv__only_recent:
|
|
||||||
preset: "yt_channel_as_tv__recent"
|
|
||||||
output_options:
|
output_options:
|
||||||
keep_files_after: "today-2weeks"
|
maintain_download_archive: True
|
||||||
|
|
||||||
|
ytdl_options:
|
||||||
|
break_on_existing: True
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
#recent_channel_test:
|
rammstein_music_videos:
|
||||||
# preset: "yt_channel"
|
preset: "yt_music_video_playlist"
|
||||||
# ytdl_options:
|
youtube:
|
||||||
# break_on_reject: True
|
playlist_id: "PLVTLbc6i-h_iuhdwUfuPDLFLXG2QQnz-x"
|
||||||
# youtube:
|
overrides:
|
||||||
# channel_id: "UCsvn_Po0SmunchJYOWpOxMg"
|
artist: "Rammstein"
|
||||||
# after: today-13days
|
|
||||||
# output_options:
|
|
||||||
# output_directory: "/tmp/dunkey"
|
|
||||||
# keep_files:
|
|
||||||
# after: today-3days
|
|
||||||
# overrides:
|
|
||||||
# tv_show_name: "Youtube: Dunkey"
|
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,12 @@ configuration:
|
||||||
working_directory: '.ytdl-sub-downloads'
|
working_directory: '.ytdl-sub-downloads'
|
||||||
|
|
||||||
presets:
|
presets:
|
||||||
yt_music_video_playlist:
|
yt_music_video:
|
||||||
# Youtube playlists are our source/download strategy. However, this
|
# A single YouTube video is our source/download strategy. However, this
|
||||||
# can be overwritten to download music videos from a 'channel' or a
|
# can be overwritten to download music videos from a "playlist", as we
|
||||||
# single 'video'
|
# will see in a preset below
|
||||||
youtube:
|
youtube:
|
||||||
download_strategy: "playlist"
|
download_strategy: "video"
|
||||||
|
|
||||||
# For advanced YTDL users only.
|
# For advanced YTDL users only.
|
||||||
# It is wise to leave ignoreerrors=True to avoid errors for things
|
# 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.
|
# 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
|
# We set both with {music_video_name}, which is a variable we define in
|
||||||
# the overrides section further below to represent consistent naming format.
|
# 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_options:
|
||||||
output_directory: "{music_video_directory}"
|
output_directory: "{music_video_directory}/{sanitized_artist}"
|
||||||
file_name: "{music_video_name}.{ext}"
|
file_name: "{music_video_name}.{ext}"
|
||||||
thumbnail_name: "{music_video_name}.jpg"
|
thumbnail_name: "{music_video_name}.jpg"
|
||||||
maintain_download_archive: True
|
|
||||||
|
|
||||||
# Always convert the video thumbnail to jpg
|
# Always convert the video thumbnail to jpg
|
||||||
# TODO: always convert all thumbnails to jpg in code
|
# 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.
|
# 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
|
# Maybe you only like one song of theirs. We can reuse our preset above
|
||||||
# to download a single video instead.
|
# to download a single video instead.
|
||||||
yt_music_video:
|
yt_music_video_playlist:
|
||||||
preset: "yt_music_video_playlist"
|
preset: "yt_music_video"
|
||||||
youtube:
|
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
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -1,4 +1,4 @@
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
setup()
|
setup()
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,9 @@ def _download_subscription_from_cli(config: ConfigFile, extra_args: List[str]) -
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Entrypoint for ytdl-subscribe"""
|
"""
|
||||||
|
Entrypoint for ytdl-subscribe
|
||||||
|
"""
|
||||||
# If no args are provided, print help and exit
|
# If no args are provided, print help and exit
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue