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")]
|
[Description("https://ffbinaries.com/api/v1/version/latest")]
|
||||||
Latest,
|
Latest,
|
||||||
|
|
||||||
[Description("https://ffbinaries.com/api/v1/version/6.1")]
|
[Description("https://ffbinaries.com/api/v1/version/6.1")]
|
||||||
V6_1,
|
V6_1,
|
||||||
|
|
||||||
[Description("https://ffbinaries.com/api/v1/version/5.1")]
|
[Description("https://ffbinaries.com/api/v1/version/5.1")]
|
||||||
V5_1,
|
V5_1,
|
||||||
|
|
||||||
[Description("https://ffbinaries.com/api/v1/version/4.4.1")]
|
[Description("https://ffbinaries.com/api/v1/version/4.4.1")]
|
||||||
V4_4_1,
|
V4_4_1,
|
||||||
|
|
||||||
[Description("https://ffbinaries.com/api/v1/version/4.2.1")]
|
[Description("https://ffbinaries.com/api/v1/version/4.2.1")]
|
||||||
V4_2_1,
|
V4_2_1,
|
||||||
|
|
||||||
[Description("https://ffbinaries.com/api/v1/version/4.2")]
|
[Description("https://ffbinaries.com/api/v1/version/4.2")]
|
||||||
V4_2,
|
V4_2,
|
||||||
|
|
||||||
[Description("https://ffbinaries.com/api/v1/version/4.1")]
|
[Description("https://ffbinaries.com/api/v1/version/4.1")]
|
||||||
V4_1,
|
V4_1,
|
||||||
|
|
||||||
[Description("https://ffbinaries.com/api/v1/version/4.0")]
|
[Description("https://ffbinaries.com/api/v1/version/4.0")]
|
||||||
V4_0,
|
V4_0,
|
||||||
|
|
||||||
[Description("https://ffbinaries.com/api/v1/version/3.4")]
|
[Description("https://ffbinaries.com/api/v1/version/3.4")]
|
||||||
V3_4,
|
V3_4,
|
||||||
|
|
||||||
[Description("https://ffbinaries.com/api/v1/version/3.3")]
|
[Description("https://ffbinaries.com/api/v1/version/3.3")]
|
||||||
V3_3,
|
V3_3,
|
||||||
|
|
||||||
[Description("https://ffbinaries.com/api/v1/version/3.2")]
|
[Description("https://ffbinaries.com/api/v1/version/3.2")]
|
||||||
V3_2
|
V3_2
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,10 @@ internal static class EnumExtensions
|
||||||
{
|
{
|
||||||
var field = enumValue.GetType().GetField(enumValue.ToString());
|
var field = enumValue.GetType().GetField(enumValue.ToString());
|
||||||
if (field == null)
|
if (field == null)
|
||||||
|
{
|
||||||
return enumValue.ToString();
|
return enumValue.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
var attributes = field.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
|
||||||
if (Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) is DescriptionAttribute attribute)
|
if (Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) is DescriptionAttribute attribute)
|
||||||
{
|
{
|
||||||
return attribute.Description;
|
return attribute.Description;
|
||||||
|
|
|
@ -51,4 +51,3 @@ public class FFMpegDownloader
|
||||||
return successList;
|
return successList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,29 +6,21 @@ namespace FFMpegCore.Extensions.Downloader.Models;
|
||||||
|
|
||||||
internal record BinaryInfo
|
internal record BinaryInfo
|
||||||
{
|
{
|
||||||
[JsonPropertyName("windows-64")]
|
[JsonPropertyName("windows-64")] public DownloadInfo? Windows64 { get; set; }
|
||||||
public DownloadInfo? Windows64 { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("windows-32")]
|
[JsonPropertyName("windows-32")] public DownloadInfo? Windows32 { get; set; }
|
||||||
public DownloadInfo? Windows32 { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("linux-32")]
|
[JsonPropertyName("linux-32")] public DownloadInfo? Linux32 { get; set; }
|
||||||
public DownloadInfo? Linux32 { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("linux-64")]
|
[JsonPropertyName("linux-64")] public DownloadInfo? Linux64 { get; set; }
|
||||||
public DownloadInfo? Linux64 { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("linux-armhf")]
|
[JsonPropertyName("linux-armhf")] public DownloadInfo? LinuxArmhf { get; set; }
|
||||||
public DownloadInfo? LinuxArmhf { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("linux-armel")]
|
[JsonPropertyName("linux-armel")] public DownloadInfo? LinuxArmel { get; set; }
|
||||||
public DownloadInfo? LinuxArmel { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("linux-arm64")]
|
[JsonPropertyName("linux-arm64")] public DownloadInfo? LinuxArm64 { get; set; }
|
||||||
public DownloadInfo? LinuxArm64 { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("osx-64")]
|
[JsonPropertyName("osx-64")] public DownloadInfo? Osx64 { get; set; }
|
||||||
public DownloadInfo? Osx64 { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Automatically get the compatible download info for current os and architecture
|
/// Automatically get the compatible download info for current os and architecture
|
||||||
|
|
|
@ -4,12 +4,9 @@ namespace FFMpegCore.Extensions.Downloader.Models;
|
||||||
|
|
||||||
internal record DownloadInfo
|
internal record DownloadInfo
|
||||||
{
|
{
|
||||||
[JsonPropertyName("ffmpeg")]
|
[JsonPropertyName("ffmpeg")] public string? FFMpeg { get; set; }
|
||||||
public string? FFMpeg { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("ffprobe")]
|
[JsonPropertyName("ffprobe")] public string? FFProbe { get; set; }
|
||||||
public string? FFProbe { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("ffplay")]
|
[JsonPropertyName("ffplay")] public string? FFPlay { get; set; }
|
||||||
public string? FFPlay { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,9 @@ namespace FFMpegCore.Extensions.Downloader.Models;
|
||||||
|
|
||||||
internal record VersionInfo
|
internal record VersionInfo
|
||||||
{
|
{
|
||||||
[JsonPropertyName("version")]
|
[JsonPropertyName("version")] public string? Version { get; set; }
|
||||||
public string? Version { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("permalink")]
|
[JsonPropertyName("permalink")] public string? Permalink { get; set; }
|
||||||
public string? Permalink { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("bin")]
|
[JsonPropertyName("bin")] public BinaryInfo? BinaryInfo { get; set; }
|
||||||
public BinaryInfo? BinaryInfo { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue