diff --git a/ExternalProgram.cs b/ExternalProgram.cs index 768b2b3..43563d7 100644 --- a/ExternalProgram.cs +++ b/ExternalProgram.cs @@ -23,6 +23,9 @@ public enum DependencyStatus public static string? YtdlpPath { get; private set; } public static string? FFmpegPath { get; private set; } + // https://github.com/yt-dlp/FFmpeg-Builds/releases/latest + private const string FFmpegFileName = "ffmpeg-n5.1-latest-win64-gpl-shared-5.1.zip"; + internal static async Task DownloadYtdlp() { Log.Information("Start downloading yt-dlp..."); @@ -61,11 +64,11 @@ internal static async Task DownloadFFmpeg() FFmpegPath = TempDirectory.FullName; HttpClient client = new(); - string ffmpegUrl = @"https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-n5.0-latest-win64-gpl-shared-5.0.zip"; + string ffmpegUrl = @$"https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/{FFmpegFileName}"; var response = await client.GetAsync(ffmpegUrl, HttpCompletionOption.ResponseHeadersRead); Log.Debug("Get response from {FFmpegUrl}", ffmpegUrl); - string archivePath = Path.Combine(FFmpegPath, "ffmpeg-n5.0-latest-win64-gpl-shared-5.0.zip"); + string archivePath = Path.Combine(FFmpegPath, FFmpegFileName); File.Delete(archivePath); using (FileStream fs = new(archivePath, FileMode.Create)) @@ -78,7 +81,7 @@ internal static async Task DownloadFFmpeg() try { using ZipArchive archive = ZipArchive.Open(archivePath); - Log.Information("Start unpacking ffmpeg-n5.0-latest-win64-gpl-shared-5.0.zip"); + Log.Information("Start unpacking {FFmpegFileName}", FFmpegFileName); foreach (var entry in archive.Entries.Where(entry => !entry.IsDirectory && (entry.Key.EndsWith("exe") diff --git a/Properties/PublishProfiles/ClickOnceProfile.pubxml b/Properties/PublishProfiles/ClickOnceProfile.pubxml index 1f04294..fa38b6c 100644 --- a/Properties/PublishProfiles/ClickOnceProfile.pubxml +++ b/Properties/PublishProfiles/ClickOnceProfile.pubxml @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 0 - 1.7.1.0 + 1.7.1.1 True Release True