add MediaHash. Step1

This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-11-17 07:46:05 +02:00
parent d355f81c63
commit fd95d2ba2c
27 changed files with 421 additions and 288 deletions
@@ -32,8 +32,5 @@ public class AnnotationConfig
}
}
public List<string> VideoFormats { get; set; } = null!;
public List<string> ImageFormats { get; set; } = null!;
public string AnnotationsDbFile { get; set; } = null!;
}
+3 -2
View File
@@ -6,8 +6,9 @@ namespace Azaion.Common.DTO;
public class FormState
{
public MediaFileInfo? CurrentMedia { get; set; }
public string MediaName => CurrentMedia?.FName ?? "";
public MediaFile? CurrentMedia { get; set; }
public string CurrentMediaHash => CurrentMedia?.Hash ?? "";
public string CurrentMediaName => CurrentMedia?.Name ?? "";
public Size CurrentMediaSize { get; set; }
public TimeSpan CurrentVideoLength { get; set; }
-15
View File
@@ -1,15 +0,0 @@
using Azaion.Common.Extensions;
namespace Azaion.Common.DTO;
public class MediaFileInfo
{
public string Name { get; set; } = null!;
public string Path { get; set; } = null!;
public TimeSpan Duration { get; set; }
public string DurationStr => $"{Duration:h\\:mm\\:ss}";
public bool HasAnnotations { get; set; }
public MediaTypes MediaType { get; set; }
public string FName => Name.ToFName();
}
-8
View File
@@ -1,8 +0,0 @@
namespace Azaion.Common.DTO;
public enum MediaTypes
{
None = 0,
Video = 1,
Image = 2
}
@@ -6,16 +6,17 @@ using MessagePack;
[MessagePackObject]
public class AnnotationMessage
{
[Key(0)] public DateTime CreatedDate { get; set; }
[Key(1)] public string Name { get; set; } = null!;
[Key(2)] public string OriginalMediaName { get; set; } = null!;
[Key(3)] public TimeSpan Time { get; set; }
[Key(4)] public string ImageExtension { get; set; } = null!;
[Key(5)] public string Detections { get; set; } = null!;
[Key(6)] public byte[]? Image { get; set; } = null!;
[Key(7)] public RoleEnum Role { get; set; }
[Key(8)] public string Email { get; set; } = null!;
[Key(9)] public SourceEnum Source { get; set; }
[Key(0)] public DateTime CreatedDate { get; set; }
[Key(1)] public string Name { get; set; } = null!;
[Key(11)] public string MediaHash { get; set; } = null!;
[Key(2)] public string OriginalMediaName { get; set; } = null!;
[Key(3)] public TimeSpan Time { get; set; }
[Key(4)] public string ImageExtension { get; set; } = null!;
[Key(5)] public string Detections { get; set; } = null!;
[Key(6)] public byte[]? Image { get; set; } = null!;
[Key(7)] public RoleEnum Role { get; set; }
[Key(8)] public string Email { get; set; } = null!;
[Key(9)] public SourceEnum Source { get; set; }
[Key(10)] public AnnotationStatus Status { get; set; }
}