From 7509a4de667f77d730ae94fe4b0685a919ece5e6 Mon Sep 17 00:00:00 2001 From: the-database <25811902+the-database@users.noreply.github.com> Date: Tue, 30 Jul 2024 11:05:16 -0400 Subject: [PATCH] fix command line args --- BuildMpvUpscale2xAnimeJaNai/Program.cs | 4 ++-- .../Properties/launchSettings.json | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 BuildMpvUpscale2xAnimeJaNai/Properties/launchSettings.json diff --git a/BuildMpvUpscale2xAnimeJaNai/Program.cs b/BuildMpvUpscale2xAnimeJaNai/Program.cs index 64ed9e1..ce09118 100644 --- a/BuildMpvUpscale2xAnimeJaNai/Program.cs +++ b/BuildMpvUpscale2xAnimeJaNai/Program.cs @@ -7,7 +7,7 @@ using System.Text; using static Downloader; -if (args.Length < 2) +if (args.Length < 1) { throw new ArgumentException("Version is required."); } @@ -15,7 +15,7 @@ // Get the path of the currently executing assembly var assemblyDirectory = AppContext.BaseDirectory; var animejanaiDirectory = Path.Combine(assemblyDirectory, "mpv-upscale-2x_animejanai"); -var installDirectory = Path.Combine(assemblyDirectory, $"mpv-upscale-2x_animejanai-v{args[1]}"); +var installDirectory = Path.Combine(assemblyDirectory, $"mpv-upscale-2x_animejanai-v{args[0]}"); var vapourSynthPluginsPath = Path.Combine(installDirectory, "vs-plugins"); var vsmlrtModelsPath = Path.Combine(vapourSynthPluginsPath, "models"); var vapourSynthVersion = "R69"; diff --git a/BuildMpvUpscale2xAnimeJaNai/Properties/launchSettings.json b/BuildMpvUpscale2xAnimeJaNai/Properties/launchSettings.json new file mode 100644 index 0000000..c921c6d --- /dev/null +++ b/BuildMpvUpscale2xAnimeJaNai/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "BuildMpvUpscale2xAnimeJaNai": { + "commandName": "Project", + "commandLineArgs": "3.1.0" + } + } +} \ No newline at end of file