From 411998928e7a8bf52f65bed3f0b434671daff909 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Thu, 26 Jun 2025 18:26:09 -0400 Subject: Configure ytdl-sub Not a big fan. It's obtuse to configure, the implementation is complicated (relative to just using the yt-dlp CLI), and difficult to debug. We would probably still need some additional automation to get the file layout we want. It might be more straightforward to just write our own automation on top of yt-dlp. --- hostnix/elmo/media.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/hostnix/elmo/media.nix b/hostnix/elmo/media.nix index 8fff82e..53fa0d2 100644 --- a/hostnix/elmo/media.nix +++ b/hostnix/elmo/media.nix @@ -33,6 +33,49 @@ locations."/".proxyPass = "http://[::1]:8096"; }; + services.ytdl-sub.instances.main = { + enable = true; + # TODO schedule = null; + config = { + presets = { + "YouTube Channel" = { + preset = [ + "Jellyfin TV Show by Date" + "Max 1080p" + ]; + overrides = { + tv_show_directory = "/srv/media/incoming/YouTube"; + date_range_after = "20240101"; # arbitrarily early default + }; + embed_thumbnail = true; + subtitles = { + embed_subtitles = true; + allow_auto_generated_subtitles = true; + }; + chapters = { + embed_chapters = true; + sponsorblock_categories = [ "all" ]; + }; + date_range = { + after = "{date_range_after}"; + before = "today-2days"; + }; + ytdl_options = { + break_on_existing = true; + }; + }; + }; + }; + subscriptions = { + "YouTube Channel" = { + "~Moon Channel" = { + url = "https://www.youtube.com/@moon-channel"; + date_range_after = "20241201"; + }; + }; + }; + }; + # TODO kavita vs komga? services.kavita = { enable = true; -- cgit v1.3.1