diff --git a/FFMpegCore.Extensions.Downloader/Enums/FFMpegVersions.cs b/FFMpegCore.Extensions.Downloader/Enums/FFMpegVersions.cs
index 7a9f476..a2e5f09 100644
--- a/FFMpegCore.Extensions.Downloader/Enums/FFMpegVersions.cs
+++ b/FFMpegCore.Extensions.Downloader/Enums/FFMpegVersions.cs
@@ -6,24 +6,34 @@ public enum FFMpegVersions : ushort
{
[Description("https://ffbinaries.com/api/v1/version/latest")]
Latest,
+
[Description("https://ffbinaries.com/api/v1/version/6.1")]
V6_1,
+
[Description("https://ffbinaries.com/api/v1/version/5.1")]
V5_1,
+
[Description("https://ffbinaries.com/api/v1/version/4.4.1")]
V4_4_1,
+
[Description("https://ffbinaries.com/api/v1/version/4.2.1")]
V4_2_1,
+
[Description("https://ffbinaries.com/api/v1/version/4.2")]
V4_2,
+
[Description("https://ffbinaries.com/api/v1/version/4.1")]
V4_1,
+
[Description("https://ffbinaries.com/api/v1/version/4.0")]
V4_0,
+
[Description("https://ffbinaries.com/api/v1/version/3.4")]
V3_4,
+
[Description("https://ffbinaries.com/api/v1/version/3.3")]
V3_3,
+
[Description("https://ffbinaries.com/api/v1/version/3.2")]
V3_2
}
diff --git a/FFMpegCore.Extensions.Downloader/Extensions/EnumExtensions.cs b/FFMpegCore.Extensions.Downloader/Extensions/EnumExtensions.cs
index e2f5616..7930c13 100644
--- a/FFMpegCore.Extensions.Downloader/Extensions/EnumExtensions.cs
+++ b/FFMpegCore.Extensions.Downloader/Extensions/EnumExtensions.cs
@@ -8,9 +8,10 @@ internal static class EnumExtensions
{
var field = enumValue.GetType().GetField(enumValue.ToString());
if (field == null)
+ {
return enumValue.ToString();
+ }
- var attributes = field.GetCustomAttributes(typeof(DescriptionAttribute), false);
if (Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) is DescriptionAttribute attribute)
{
return attribute.Description;
diff --git a/FFMpegCore.Extensions.Downloader/FFMpegCore.Extensions.Downloader.csproj b/FFMpegCore.Extensions.Downloader/FFMpegCore.Extensions.Downloader.csproj
index 720cbf1..0c6f791 100644
--- a/FFMpegCore.Extensions.Downloader/FFMpegCore.Extensions.Downloader.csproj
+++ b/FFMpegCore.Extensions.Downloader/FFMpegCore.Extensions.Downloader.csproj
@@ -15,7 +15,7 @@
ffmpeg ffprobe convert video audio mediafile resize analyze download
Malte Rosenbjerg, Vlad Jerca, Max Bagryantsev, Kerry Cao
-
+
diff --git a/FFMpegCore.Extensions.Downloader/FFMpegDownloader.cs b/FFMpegCore.Extensions.Downloader/FFMpegDownloader.cs
index adc9c74..87c6fd9 100644
--- a/FFMpegCore.Extensions.Downloader/FFMpegDownloader.cs
+++ b/FFMpegCore.Extensions.Downloader/FFMpegDownloader.cs
@@ -20,13 +20,13 @@ public class FFMpegDownloader
{
// get all available versions
var versionInfo = await FFbinariesService.GetVersionInfo(version);
-
+
// get the download info for the current platform
var downloadInfo = versionInfo.BinaryInfo?.GetCompatibleDownloadInfo(platformOverride) ??
throw new FFMpegDownloaderException("Failed to get compatible download info");
-
+
var successList = new List();
-
+
// download ffmpeg if selected
if (binaries.HasFlag(FFMpegBinaries.FFMpeg) && downloadInfo.FFMpeg is not null)
{
@@ -51,4 +51,3 @@ public class FFMpegDownloader
return successList;
}
}
-
diff --git a/FFMpegCore.Extensions.Downloader/Models/BinaryInfo.cs b/FFMpegCore.Extensions.Downloader/Models/BinaryInfo.cs
index e855b2d..e91fcee 100644
--- a/FFMpegCore.Extensions.Downloader/Models/BinaryInfo.cs
+++ b/FFMpegCore.Extensions.Downloader/Models/BinaryInfo.cs
@@ -6,29 +6,21 @@ namespace FFMpegCore.Extensions.Downloader.Models;
internal record BinaryInfo
{
- [JsonPropertyName("windows-64")]
- public DownloadInfo? Windows64 { get; set; }
+ [JsonPropertyName("windows-64")] public DownloadInfo? Windows64 { get; set; }
- [JsonPropertyName("windows-32")]
- public DownloadInfo? Windows32 { get; set; }
+ [JsonPropertyName("windows-32")] public DownloadInfo? Windows32 { get; set; }
- [JsonPropertyName("linux-32")]
- public DownloadInfo? Linux32 { get; set; }
+ [JsonPropertyName("linux-32")] public DownloadInfo? Linux32 { get; set; }
- [JsonPropertyName("linux-64")]
- public DownloadInfo? Linux64 { get; set; }
+ [JsonPropertyName("linux-64")] public DownloadInfo? Linux64 { get; set; }
- [JsonPropertyName("linux-armhf")]
- public DownloadInfo? LinuxArmhf { get; set; }
+ [JsonPropertyName("linux-armhf")] public DownloadInfo? LinuxArmhf { get; set; }
- [JsonPropertyName("linux-armel")]
- public DownloadInfo? LinuxArmel { get; set; }
+ [JsonPropertyName("linux-armel")] public DownloadInfo? LinuxArmel { get; set; }
- [JsonPropertyName("linux-arm64")]
- public DownloadInfo? LinuxArm64 { get; set; }
+ [JsonPropertyName("linux-arm64")] public DownloadInfo? LinuxArm64 { get; set; }
- [JsonPropertyName("osx-64")]
- public DownloadInfo? Osx64 { get; set; }
+ [JsonPropertyName("osx-64")] public DownloadInfo? Osx64 { get; set; }
///
/// Automatically get the compatible download info for current os and architecture
diff --git a/FFMpegCore.Extensions.Downloader/Models/DownloadInfo.cs b/FFMpegCore.Extensions.Downloader/Models/DownloadInfo.cs
index 2e3e692..5b7c0fd 100644
--- a/FFMpegCore.Extensions.Downloader/Models/DownloadInfo.cs
+++ b/FFMpegCore.Extensions.Downloader/Models/DownloadInfo.cs
@@ -4,12 +4,9 @@ namespace FFMpegCore.Extensions.Downloader.Models;
internal record DownloadInfo
{
- [JsonPropertyName("ffmpeg")]
- public string? FFMpeg { get; set; }
+ [JsonPropertyName("ffmpeg")] public string? FFMpeg { get; set; }
- [JsonPropertyName("ffprobe")]
- public string? FFProbe { get; set; }
+ [JsonPropertyName("ffprobe")] public string? FFProbe { get; set; }
- [JsonPropertyName("ffplay")]
- public string? FFPlay { get; set; }
+ [JsonPropertyName("ffplay")] public string? FFPlay { get; set; }
}
diff --git a/FFMpegCore.Extensions.Downloader/Models/VersionInfo.cs b/FFMpegCore.Extensions.Downloader/Models/VersionInfo.cs
index 490f431..ef24f62 100644
--- a/FFMpegCore.Extensions.Downloader/Models/VersionInfo.cs
+++ b/FFMpegCore.Extensions.Downloader/Models/VersionInfo.cs
@@ -4,12 +4,9 @@ namespace FFMpegCore.Extensions.Downloader.Models;
internal record VersionInfo
{
- [JsonPropertyName("version")]
- public string? Version { get; set; }
+ [JsonPropertyName("version")] public string? Version { get; set; }
- [JsonPropertyName("permalink")]
- public string? Permalink { get; set; }
+ [JsonPropertyName("permalink")] public string? Permalink { get; set; }
- [JsonPropertyName("bin")]
- public BinaryInfo? BinaryInfo { get; set; }
+ [JsonPropertyName("bin")] public BinaryInfo? BinaryInfo { get; set; }
}
diff --git a/FFMpegCore.Extensions.Downloader/Services/FFbinariesService.cs b/FFMpegCore.Extensions.Downloader/Services/FFbinariesService.cs
index 155d925..2a6c616 100644
--- a/FFMpegCore.Extensions.Downloader/Services/FFbinariesService.cs
+++ b/FFMpegCore.Extensions.Downloader/Services/FFbinariesService.cs
@@ -37,7 +37,7 @@ internal class FFbinariesService
return versionInfo ??
throw new FFMpegDownloaderException($"Failed to deserialize version info from {versionUri}", jsonString);
}
-
+
///
/// Download file from uri
///