From 568caf9eb0f9a10bea00756befb3f8140ea4f0bd Mon Sep 17 00:00:00 2001 From: CodeConscious <50596087+codeconscious@users.noreply.github.com> Date: Fri, 28 Aug 2026 20:38:07 +0900 Subject: [PATCH 1/4] Add downloadCommand to settings --- src/CCVTAC.Main/Downloading/Downloader.fs | 7 ++----- src/CCVTAC.Main/Settings/Settings.fs | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/CCVTAC.Main/Downloading/Downloader.fs b/src/CCVTAC.Main/Downloading/Downloader.fs index 239a111..96e9936 100644 --- a/src/CCVTAC.Main/Downloading/Downloader.fs +++ b/src/CCVTAC.Main/Downloading/Downloader.fs @@ -13,9 +13,6 @@ open System module Downloader = - [] - let private programName = "yt-dlp" - let generateDownloadArgs audioFormat userSettings (mediaType: MediaType option) additionalArgs : string = let writeJsonArg = "--write-info-json" let trimFileNamesArg = "--trim-filenames 250" @@ -83,7 +80,7 @@ module Downloader = let attemptAudioFormat format errors = let args = generateDownloadArgs (Some format) userSettings (Some mediaType) (Some [url]) - let commandWithArgs = $"{programName} {args}" + let commandWithArgs = $"{userSettings.DownloaderCommand} {args}" let downloadSettings = ToolSettings.create commandWithArgs userSettings.WorkingDirectory let downloadResult = runTool printer downloadSettings [1] @@ -125,7 +122,7 @@ module Downloader = | None -> Ok "No supplementary metadata link found." | Some url' -> let args = generateDownloadArgs None userSettings None (Some [url']) - let commandWithArgs = $"{programName} {args}" + let commandWithArgs = $"{userSettings.DownloaderCommand} {args}" let downloadSettings = ToolSettings.create commandWithArgs userSettings.WorkingDirectory let metadataDownloadResult = runTool printer downloadSettings [1] diff --git a/src/CCVTAC.Main/Settings/Settings.fs b/src/CCVTAC.Main/Settings/Settings.fs index 5327b2d..0d6eddf 100644 --- a/src/CCVTAC.Main/Settings/Settings.fs +++ b/src/CCVTAC.Main/Settings/Settings.fs @@ -47,6 +47,7 @@ module Settings = [] TagDetectionPatterns: TagDetectionPatterns [] RenamePatterns: RenamePattern list [] NormalizationForm : string + [] DownloaderCommand : string [] DownloaderUpdateCommand : string [] DownloaderAdditionalOptions : string option } @@ -75,6 +76,7 @@ module Settings = } RenamePatterns = [] NormalizationForm = "C" // Recommended for compatibility between Linux and macOS. + DownloaderCommand = String.Empty DownloaderUpdateCommand = String.Empty DownloaderAdditionalOptions = None } From 8d18e659631ed6ad79e607b066fc175840a56e43 Mon Sep 17 00:00:00 2001 From: CodeConscious <50596087+codeconscious@users.noreply.github.com> Date: Fri, 28 Aug 2026 20:49:17 +0900 Subject: [PATCH 2/4] Update readme --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ba778a..b5ebdc2 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,10 @@ The sample below contains explanations and some example values as well. // Reference: https://en.wikipedia.org/wiki/Unicode_equivalence "normalizationForm": "C", + // The full path or else (if the program name is available in your terminal) name + // of yt-dlp on your system. + "downloaderCommand": "yt-dlp", + // The full command you use to update your local yt-dlp installation. // This is a sample entry. "downloaderUpdateCommand": "pip install --upgrade yt-dlp", @@ -215,10 +219,10 @@ If you run into any issues, feel free to create an issue on GitHub. Please provi However, do keep in mind that this is ultimately a hobby project for myself, so I cannot guarantee every issue will be fixed. -## History +## Development History The first incarnation of this application was written in C#. However, after picking up [F#](https://fsharp.org/) out of curiosity about it and functional programming (FP) in 2024 and successfully using it to create other tools (mainly [Audio Tag Tools](https://github.com/codeconscious/audio-tag-tools/)) in an FP style, I become curious about F#'s OOP capabilities as well. -As an experiment, I rewrote this application in OOP-style F#, using LLMs solely for the rough initial conversion (which greatly reduced the overall time and labor necessary at the cost of requiring a *lot* of manual cleanup). Ultimately, I was surprised how much I preferred the F# code over the C#, so I decided to keep this tool in F#. +As an experiment, I rewrote this application in OOP-style F# using LLMs, which greatly reduced the overall time and labor necessary at the cost of requiring a *lot* of manual cleanup. Ultimately, I was surprised how much I preferred the F# code over the C#, so I decided to keep this tool in F#. Due to this background, the code is not particularly idiomatic F#, but it is certainly perfectly viable in its current blended-style form. That said, I'll probably tweak it over time to gradually to introduce more idiomatic F# code. From 8221850abcce68f7fffb57808ecc016ef99433fd Mon Sep 17 00:00:00 2001 From: CodeConscious <50596087+codeconscious@users.noreply.github.com> Date: Fri, 28 Aug 2026 20:56:51 +0900 Subject: [PATCH 3/4] Delete unneeded 'open' --- src/CCVTAC.Main/Settings/Settings.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CCVTAC.Main/Settings/Settings.fs b/src/CCVTAC.Main/Settings/Settings.fs index 0d6eddf..b5296a5 100644 --- a/src/CCVTAC.Main/Settings/Settings.fs +++ b/src/CCVTAC.Main/Settings/Settings.fs @@ -1,6 +1,5 @@ namespace CCVTAC.Main.Settings -open CCVTAC.Main open CCFSharpUtils.Text open Spectre.Console open FSharpPlus From 1e41ef37f975407c934cc240170775e07fdc8663 Mon Sep 17 00:00:00 2001 From: CodeConscious <50596087+codeconscious@users.noreply.github.com> Date: Fri, 28 Aug 2026 21:31:50 +0900 Subject: [PATCH 4/4] Include downloader settings in summary --- src/CCVTAC.Main/Settings/Settings.fs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CCVTAC.Main/Settings/Settings.fs b/src/CCVTAC.Main/Settings/Settings.fs index b5296a5..1c2d383 100644 --- a/src/CCVTAC.Main/Settings/Settings.fs +++ b/src/CCVTAC.Main/Settings/Settings.fs @@ -100,6 +100,8 @@ module Settings = ("Working directory", settings.WorkingDirectory) ("Move-to directory", settings.MoveToDirectory) ("History log file", settings.HistoryFile) + ("Downloader command", settings.DownloaderCommand) + ("Downloader update command", settings.DownloaderUpdateCommand) ("Split video chapters", onOrOff settings.SplitChapters) ("Embed images", onOrOff settings.EmbedImages) ("Quiet mode", onOrOff settings.QuietMode)