mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-02-18 11:02:31 +00:00
format cleanup to avoid lint error
This commit is contained in:
parent
7be5496305
commit
8e32d68877
8 changed files with 31 additions and 35 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -51,4 +51,3 @@ public class FFMpegDownloader
|
|||
return successList;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
||||
/// <summary>
|
||||
/// Automatically get the compatible download info for current os and architecture
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue