Handle export from phpMyAdmin

This commit is contained in:
Mike Phares 2023-06-18 10:54:13 -07:00
parent adb4015ac9
commit 5ec29e81a0
8 changed files with 309 additions and 95 deletions

View File

@ -13,6 +13,7 @@ completedColumns:
## Todo ## Todo
- [import-know-faces-into-db](tasks/import-know-faces-into-db.md) - [import-know-faces-into-db](tasks/import-know-faces-into-db.md)
## In Progress ## In Progress
@ -21,3 +22,5 @@ completedColumns:
- [run-scan-originals](tasks/run-scan-originals.md) - [run-scan-originals](tasks/run-scan-originals.md)
## Done ## Done
- [eof-error](tasks/eof-error.md)

23
.kanbn/tasks/eof-error.md Normal file
View File

@ -0,0 +1,23 @@
---
created: 2023-06-12T15:44:11.932Z
updated: 2023-06-12T15:45:59.891Z
assigned: ""
progress: 0
tags: []
---
# eof-error
```bash
C:/Docker/photoprism/originals/()/_ _ _/84/-50458384.jpg
C:/Docker/photoprism/originals/()/_ _ _/82/2018924182.jpg
C:/Docker/photoprism/originals/()/_ _ _/74/2104544874.jpg
C:/Docker/photoprism/originals/()/_ _ _/52/-2050448352.jpg
C:/Docker/photoprism/originals/()/_ _ _/48/-57428548.jpg
C:/Docker/photoprism/originals/()/_ _ _/43/-1820919743.jpg
C:/Docker/photoprism/originals/()/_ _ _/30/661798030.jpg
C:/Docker/photoprism/originals/()/_ _ _/27/-1959020527.jpg
C:/Docker/photoprism/originals/()/_ _ _/12/1806593512.jpg
C:/Docker/photoprism/originals/()/_ _ _/02/1985552702.jpg
C:/Docker/photoprism/originals/()/_ _ _/00/1794633000.jpg
```

View File

@ -1139,13 +1139,13 @@ public partial class DlibDotNet
propertyRoot = Property.Models.Stateless.IResult.GetResultsGroupDirectory(_Configuration.PropertyConfiguration, nameof(A_Property), create: false); propertyRoot = Property.Models.Stateless.IResult.GetResultsGroupDirectory(_Configuration.PropertyConfiguration, nameof(A_Property), create: false);
propertyLogic = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, _Resize.FileNameExtension, _Configuration.Reverse, aResultsFullGroupDirectory); propertyLogic = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, _Resize.FileNameExtension, _Configuration.Reverse, aResultsFullGroupDirectory);
} }
fileNameToCollection = !Directory.Exists(fPhotoPrismSingletonDirectory) ? fileNameToCollection = new() : F_PhotoPrism.GetFileNameToCollection(fPhotoPrismSingletonDirectory);
B_Metadata metadata = new(_Configuration.PropertyConfiguration, _Configuration.ForceMetadataLastWriteTimeToCreationTime, _Configuration.PropertiesChangedForMetadata, bResultsFullGroupDirectory); B_Metadata metadata = new(_Configuration.PropertyConfiguration, _Configuration.ForceMetadataLastWriteTimeToCreationTime, _Configuration.PropertiesChangedForMetadata, bResultsFullGroupDirectory);
containers = Shared.Models.Stateless.Methods.IContainer.SortContainers(_Configuration.PropertyConfiguration, _Configuration.IgnoreRelativePaths, _ArgZeroIsConfigurationRootDirectory, argZero, containers); containers = Shared.Models.Stateless.Methods.IContainer.SortContainers(_Configuration.PropertyConfiguration, _Configuration.IgnoreRelativePaths, _ArgZeroIsConfigurationRootDirectory, argZero, containers);
personKeyToIds = mapLogic.GetPersonKeyToIds(); personKeyToIds = mapLogic.GetPersonKeyToIds();
if (!string.IsNullOrEmpty(_Configuration.GenealogicalDataCommunicationFile) && !string.IsNullOrEmpty(a2PeopleContentDirectory) && _GenealogicalDataCommunicationHeaderLines is not null && _GenealogicalDataCommunicationFooterLines is not null && _GenealogicalDataCommunicationHeaderLines.Any() && _GenealogicalDataCommunicationFooterLines.Any()) if (!string.IsNullOrEmpty(_Configuration.GenealogicalDataCommunicationFile) && !string.IsNullOrEmpty(a2PeopleContentDirectory) && _GenealogicalDataCommunicationHeaderLines is not null && _GenealogicalDataCommunicationFooterLines is not null && _GenealogicalDataCommunicationHeaderLines.Any() && _GenealogicalDataCommunicationFooterLines.Any())
Shared.Models.Stateless.Methods.IGenealogicalDataCommunication.CreateTree(_Configuration.MappingDefaultName, _Configuration.PersonBirthdayFormat, _Configuration.PropertyConfiguration.ResultAllInOne, _PersonContainers, _GenealogicalDataCommunicationHeaderLines, _GenealogicalDataCommunicationFooterLines, ticks, a2PeopleContentDirectory, personKeyToIds); Shared.Models.Stateless.Methods.IGenealogicalDataCommunication.CreateTree(_Configuration.MappingDefaultName, _Configuration.PersonBirthdayFormat, _Configuration.PropertyConfiguration.ResultAllInOne, _PersonContainers, _GenealogicalDataCommunicationHeaderLines, _GenealogicalDataCommunicationFooterLines, ticks, a2PeopleContentDirectory, personKeyToIds);
ReadOnlyDictionary<int, List<LocationContainer<MetadataExtractor.Directory>>> idToLocationContainers = mapLogic.GetIdToLocationContainers(); ReadOnlyDictionary<int, List<LocationContainer<MetadataExtractor.Directory>>> idToLocationContainers = mapLogic.GetIdToLocationContainers();
fileNameToCollection = !Directory.Exists(fPhotoPrismSingletonDirectory) ? fileNameToCollection = new() : F_PhotoPrism.GetFileNameToCollection(fPhotoPrismSingletonDirectory);
FullDoWork(argZero, propertyRoot, ticks, aResultsFullGroupDirectory, bResultsFullGroupDirectory, t, containers, propertyLogic, metadata, fileNameToCollection, idToLocationContainers, mapLogic); FullDoWork(argZero, propertyRoot, ticks, aResultsFullGroupDirectory, bResultsFullGroupDirectory, t, containers, propertyLogic, metadata, fileNameToCollection, idToLocationContainers, mapLogic);
if (_Configuration.LookForAbandoned) if (_Configuration.LookForAbandoned)
LookForAbandoned(bResultsFullGroupDirectory, containers, idToLocationContainers); LookForAbandoned(bResultsFullGroupDirectory, containers, idToLocationContainers);

View File

@ -0,0 +1,114 @@
using System.Text.Json.Serialization;
namespace View_by_Distance.PhotoPrism.Models;
public record DatabaseFile(
[property: JsonPropertyName("id")] string Id,
[property: JsonPropertyName("photo_id")] string PhotoId,
[property: JsonPropertyName("photo_uid")] string PhotoUid,
[property: JsonPropertyName("photo_taken_at")] string PhotoTakenAt,
[property: JsonPropertyName("time_index")] string TimeIndex,
[property: JsonPropertyName("media_id")] string MediaId,
[property: JsonPropertyName("media_utc")] string MediaUtc,
[property: JsonPropertyName("instance_id")] string InstanceId,
[property: JsonPropertyName("file_uid")] string FileUid,
[property: JsonPropertyName("file_name")] string FileName,
[property: JsonPropertyName("file_root")] string FileRoot,
[property: JsonPropertyName("original_name")] string OriginalName,
[property: JsonPropertyName("file_hash")] string FileHash,
[property: JsonPropertyName("file_size")] string FileSize,
[property: JsonPropertyName("file_codec")] string FileCodec,
[property: JsonPropertyName("file_type")] string FileType,
[property: JsonPropertyName("media_type")] string MediaType,
[property: JsonPropertyName("file_mime")] string FileMime,
[property: JsonPropertyName("file_primary")] string FilePrimary,
[property: JsonPropertyName("file_sidecar")] string FileSidecar,
[property: JsonPropertyName("file_missing")] string FileMissing,
[property: JsonPropertyName("file_portrait")] string FilePortrait,
[property: JsonPropertyName("file_video")] string FileVideo,
[property: JsonPropertyName("file_duration")] string FileDuration,
[property: JsonPropertyName("file_fps")] string FileFps,
[property: JsonPropertyName("file_frames")] string FileFrames,
[property: JsonPropertyName("file_width")] string FileWidth,
[property: JsonPropertyName("file_height")] string FileHeight,
[property: JsonPropertyName("file_orientation")] string FileOrientation,
[property: JsonPropertyName("file_orientation_src")] string FileOrientationSrc,
[property: JsonPropertyName("file_projection")] string FileProjection,
[property: JsonPropertyName("file_aspect_ratio")] string FileAspectRatio,
[property: JsonPropertyName("file_hdr")] string FileHdr,
[property: JsonPropertyName("file_watermark")] string FileWatermark,
[property: JsonPropertyName("file_color_profile")] string FileColorProfile,
[property: JsonPropertyName("file_main_color")] string FileMainColor,
[property: JsonPropertyName("file_colors")] string FileColors,
[property: JsonPropertyName("File_luminance")] string FileLuminance,
[property: JsonPropertyName("file_diff")] string FileDiff,
[property: JsonPropertyName("file_chroma")] string FileChroma,
[property: JsonPropertyName("file_software")] string FileSoftware,
[property: JsonPropertyName("file_error")] string FileError,
[property: JsonPropertyName("mod_time")] string ModTime,
[property: JsonPropertyName("created_at")] string CreatedAt,
[property: JsonPropertyName("created_in")] string CreatedIn,
[property: JsonPropertyName("updated_at")] string UpdatedAt,
[property: JsonPropertyName("updated_in")] string UpdatedIn,
[property: JsonPropertyName("published_at")] object PublishedAt,
[property: JsonPropertyName("deleted_at")] object DeletedAt)
{
internal static Shared.Models.DatabaseFile Map(DatabaseFile databaseFile)
{
Shared.Models.DatabaseFile result;
(int id, int photoId) = (int.Parse(databaseFile.Id), int.Parse(databaseFile.PhotoId));
(int fileWidth, int fileHeight) = (int.Parse(databaseFile.FileWidth), int.Parse(databaseFile.FileHeight));
result = new(id,
photoId,
databaseFile.PhotoUid,
databaseFile.PhotoTakenAt,
databaseFile.TimeIndex,
databaseFile.MediaId,
databaseFile.MediaUtc,
databaseFile.InstanceId,
databaseFile.FileUid,
databaseFile.FileName,
databaseFile.FileRoot,
databaseFile.OriginalName,
databaseFile.FileHash,
databaseFile.FileSize,
databaseFile.FileCodec,
databaseFile.FileType,
databaseFile.MediaType,
databaseFile.FileMime,
databaseFile.FilePrimary,
databaseFile.FileSidecar,
databaseFile.FileMissing,
databaseFile.FilePortrait,
databaseFile.FileVideo,
databaseFile.FileDuration,
databaseFile.FileFps,
databaseFile.FileFrames,
fileWidth,
fileHeight,
databaseFile.FileOrientation,
databaseFile.FileOrientationSrc,
databaseFile.FileProjection,
databaseFile.FileAspectRatio,
databaseFile.FileHdr,
databaseFile.FileWatermark,
databaseFile.FileColorProfile,
databaseFile.FileMainColor,
databaseFile.FileColors,
databaseFile.FileLuminance,
databaseFile.FileDiff,
databaseFile.FileChroma,
databaseFile.FileSoftware,
databaseFile.FileError,
databaseFile.ModTime,
databaseFile.CreatedAt,
databaseFile.CreatedIn,
databaseFile.UpdatedAt,
databaseFile.UpdatedIn,
databaseFile.PublishedAt,
databaseFile.DeletedAt);
return result;
}
}

View File

@ -0,0 +1,60 @@
using System.Text.Json.Serialization;
namespace View_by_Distance.PhotoPrism.Models;
public record Marker(
[property: JsonPropertyName("marker_uid")] string MarkerUid,
[property: JsonPropertyName("file_uid")] string FileUid,
[property: JsonPropertyName("marker_type")] string MarkerType,
[property: JsonPropertyName("marker_src")] string MarkerSrc,
[property: JsonPropertyName("marker_name")] string MarkerName,
[property: JsonPropertyName("marker_review")] string MarkerReview,
[property: JsonPropertyName("marker_invalid")] string MarkerInvalid,
[property: JsonPropertyName("subj_uid")] string SubjUid,
[property: JsonPropertyName("subj_src")] string SubjSrc,
[property: JsonPropertyName("face_id")] string FaceId,
[property: JsonPropertyName("face_dist")] string FaceDist,
[property: JsonPropertyName("x")] string X,
[property: JsonPropertyName("y")] string Y,
[property: JsonPropertyName("w")] string W,
[property: JsonPropertyName("h")] string H,
[property: JsonPropertyName("q")] string Q,
[property: JsonPropertyName("size")] string Size,
[property: JsonPropertyName("score")] string Score,
[property: JsonPropertyName("thumb")] string Thumb,
[property: JsonPropertyName("matched_at")] string MatchedAt,
[property: JsonPropertyName("created_at")] string CreatedAt,
[property: JsonPropertyName("updated_at")] string UpdatedAt)
{
internal static Shared.Models.Marker Map(Marker marker)
{
Shared.Models.Marker result;
(double x, double y, double w, double h, double score) = (double.Parse(marker.X), double.Parse(marker.Y), double.Parse(marker.W), double.Parse(marker.H), double.Parse(marker.Score));
result = new(
marker.MarkerUid,
marker.FileUid,
marker.MarkerType,
marker.MarkerSrc,
marker.MarkerName,
marker.MarkerReview,
marker.MarkerInvalid,
marker.SubjUid,
marker.SubjSrc,
marker.FaceId,
marker.FaceDist,
x,
y,
w,
h,
marker.Q,
marker.Size,
score,
marker.Thumb,
marker.MatchedAt,
marker.CreatedAt,
marker.UpdatedAt);
return result;
}
}

View File

@ -16,8 +16,17 @@ public class F_PhotoPrism
else else
{ {
string json = File.ReadAllText(fileName); string json = File.ReadAllText(fileName);
JsonElement? jsonElement = JsonSerializer.Deserialize<JsonElement>(json); JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
results = jsonElement.Value.EnumerateObject().ToArray(); if (jsonElements is null || !jsonElements.Any())
results = Array.Empty<JsonProperty>();
else
{
JsonElement jsonElement = jsonElements.Last();
if (jsonElement.ValueKind != JsonValueKind.Object)
results = Array.Empty<JsonProperty>();
else
results = jsonElement.EnumerateObject().ToArray();
}
} }
return results; return results;
} }
@ -30,13 +39,13 @@ public class F_PhotoPrism
if (!jsonProperties.Any()) if (!jsonProperties.Any())
results = null; results = null;
else else
results = JsonSerializer.Deserialize<Marker[]>(jsonProperties[1].Value); results = JsonSerializer.Deserialize<Marker[]>(jsonProperties.Last().Value);
return results; return results;
} }
private static Dictionary<string, List<Marker>> GetFileUIdToMarkers(string fPhotoPrismSingletonDirectory) private static Dictionary<string, List<Shared.Models.Marker>> GetFileUIdToMarkers(string fPhotoPrismSingletonDirectory)
{ {
Dictionary<string, List<Marker>> results = new(); Dictionary<string, List<Shared.Models.Marker>> results = new();
Marker[]? markers = GetMarkers(fPhotoPrismSingletonDirectory); Marker[]? markers = GetMarkers(fPhotoPrismSingletonDirectory);
if (markers is null) if (markers is null)
throw new NullReferenceException(nameof(markers)); throw new NullReferenceException(nameof(markers));
@ -44,34 +53,44 @@ public class F_PhotoPrism
{ {
if (!results.ContainsKey(marker.FileUid)) if (!results.ContainsKey(marker.FileUid))
results.Add(marker.FileUid, new()); results.Add(marker.FileUid, new());
results[marker.FileUid].Add(marker); results[marker.FileUid].Add(Marker.Map(marker));
} }
return results; return results;
} }
private static DatabaseFile[]? GetDatabaseFiles(string fPhotoPrismSingletonDirectory) private static List<Shared.Models.DatabaseFile>? GetDatabaseFiles(string fPhotoPrismSingletonDirectory)
{ {
DatabaseFile[]? results; List<Shared.Models.DatabaseFile>? results;
string file = Path.Combine(fPhotoPrismSingletonDirectory, "files.json"); string file = Path.Combine(fPhotoPrismSingletonDirectory, "files.json");
JsonProperty[] jsonProperties = GetJsonProperty(file); JsonProperty[] jsonProperties = GetJsonProperty(file);
if (!jsonProperties.Any()) if (!jsonProperties.Any())
results = null; results = null;
else else
results = JsonSerializer.Deserialize<DatabaseFile[]>(jsonProperties[1].Value); {
results = new();
DatabaseFile[]? databaseFiles = JsonSerializer.Deserialize<DatabaseFile[]>(jsonProperties.Last().Value);
if (databaseFiles is null)
results = null;
else
{
foreach (DatabaseFile databaseFile in databaseFiles)
results.Add(DatabaseFile.Map(databaseFile));
}
}
return results; return results;
} }
public static Dictionary<string, List<MappingFromPhotoPrism>> GetFileNameToCollection(string fPhotoPrismSingletonDirectory) public static Dictionary<string, List<MappingFromPhotoPrism>> GetFileNameToCollection(string fPhotoPrismSingletonDirectory)
{ {
Dictionary<string, List<MappingFromPhotoPrism>> results = new(); Dictionary<string, List<MappingFromPhotoPrism>> results = new();
List<Marker>? makers; List<Shared.Models.Marker>? makers;
MappingFromPhotoPrism mappingFromPhotoPrism; MappingFromPhotoPrism mappingFromPhotoPrism;
List<MappingFromPhotoPrism>? mappingFromPhotoPrismCollection; List<MappingFromPhotoPrism>? mappingFromPhotoPrismCollection;
DatabaseFile[]? databaseFiles = GetDatabaseFiles(fPhotoPrismSingletonDirectory); List<Shared.Models.DatabaseFile>? databaseFiles = GetDatabaseFiles(fPhotoPrismSingletonDirectory);
if (databaseFiles is not null) if (databaseFiles is not null)
{ {
Dictionary<string, List<Marker>> fileUIdToMarkers = GetFileUIdToMarkers(fPhotoPrismSingletonDirectory); Dictionary<string, List<Shared.Models.Marker>> fileUIdToMarkers = GetFileUIdToMarkers(fPhotoPrismSingletonDirectory);
foreach (DatabaseFile databaseFile in databaseFiles) foreach (Shared.Models.DatabaseFile databaseFile in databaseFiles)
{ {
if (!results.TryGetValue(databaseFile.FileName, out mappingFromPhotoPrismCollection)) if (!results.TryGetValue(databaseFile.FileName, out mappingFromPhotoPrismCollection))
{ {
@ -104,8 +123,8 @@ public class F_PhotoPrism
System.Drawing.Rectangle? prismRectangle; System.Drawing.Rectangle? prismRectangle;
System.Drawing.Rectangle intersectRectangle; System.Drawing.Rectangle intersectRectangle;
Dictionary<int, PersonContainer[]>? normalizedRectangleToPersonContainers; Dictionary<int, PersonContainer[]>? normalizedRectangleToPersonContainers;
(MappingFromPhotoPrism MappingFromPhotoPrism, Marker Marker, double Percent)[] sortedCollection; (MappingFromPhotoPrism MappingFromPhotoPrism, Shared.Models.Marker Marker, double Percent)[] sortedCollection;
List<(MappingFromPhotoPrism MappingFromPhotoPrism, Marker Marker, double Percent)> collection = new(); List<(MappingFromPhotoPrism MappingFromPhotoPrism, Shared.Models.Marker Marker, double Percent)> collection = new();
foreach (Face face in distinctFilteredFaces) foreach (Face face in distinctFilteredFaces)
{ {
collection.Clear(); collection.Clear();
@ -122,7 +141,7 @@ public class F_PhotoPrism
dlibRectangle = new(face.Location.Left, face.Location.Top, face.Location.Right - face.Location.Left, face.Location.Bottom - face.Location.Top); dlibRectangle = new(face.Location.Left, face.Location.Top, face.Location.Right - face.Location.Left, face.Location.Bottom - face.Location.Top);
foreach (MappingFromPhotoPrism mappingFromPhotoPrism in face.Mapping.MappingFromPhotoPrismCollection) foreach (MappingFromPhotoPrism mappingFromPhotoPrism in face.Mapping.MappingFromPhotoPrismCollection)
{ {
foreach (Marker marker in mappingFromPhotoPrism.Markers) foreach (Shared.Models.Marker marker in mappingFromPhotoPrism.Markers)
{ {
prismRectangle = ILocation.GetRectangle(face.OutputResolution, mappingFromPhotoPrism.DatabaseFile, marker); prismRectangle = ILocation.GetRectangle(face.OutputResolution, mappingFromPhotoPrism.DatabaseFile, marker);
if (prismRectangle is null) if (prismRectangle is null)
@ -139,7 +158,7 @@ public class F_PhotoPrism
if (!collection.Any()) if (!collection.Any())
continue; continue;
sortedCollection = collection.OrderByDescending(l => l.Percent).ToArray(); sortedCollection = collection.OrderByDescending(l => l.Percent).ToArray();
foreach ((MappingFromPhotoPrism mappingFromPhotoPrism, Marker marker, double percent) in sortedCollection) foreach ((MappingFromPhotoPrism mappingFromPhotoPrism, Shared.Models.Marker marker, double percent) in sortedCollection)
{ {
foreach (PersonContainer personContainer in personContainers) foreach (PersonContainer personContainer in personContainers)
{ {

View File

@ -1,54 +1,52 @@
using System.Text.Json.Serialization;
namespace View_by_Distance.Shared.Models; namespace View_by_Distance.Shared.Models;
public record DatabaseFile( public record DatabaseFile(
[property: JsonPropertyName("id")] int Id, int Id,
[property: JsonPropertyName("photo_id")] int PhotoId, int PhotoId,
[property: JsonPropertyName("photo_uid")] string PhotoUid, string PhotoUid,
[property: JsonPropertyName("photo_taken_at")] string PhotoTakenAt, string PhotoTakenAt,
[property: JsonPropertyName("time_index")] string TimeIndex, string TimeIndex,
[property: JsonPropertyName("media_id")] string MediaId, string MediaId,
[property: JsonPropertyName("media_utc")] object MediaUtc, string MediaUtc,
[property: JsonPropertyName("instance_id")] string InstanceId, string InstanceId,
[property: JsonPropertyName("file_uid")] string FileUid, string FileUid,
[property: JsonPropertyName("file_name")] string FileName, string FileName,
[property: JsonPropertyName("file_root")] string FileRoot, string FileRoot,
[property: JsonPropertyName("original_name")] string OriginalName, string OriginalName,
[property: JsonPropertyName("file_hash")] string FileHash, string FileHash,
[property: JsonPropertyName("file_size")] int FileSize, string FileSize,
[property: JsonPropertyName("file_codec")] string FileCodec, string FileCodec,
[property: JsonPropertyName("file_type")] string FileType, string FileType,
[property: JsonPropertyName("media_type")] string MediaType, string MediaType,
[property: JsonPropertyName("file_mime")] string FileMime, string FileMime,
[property: JsonPropertyName("file_primary")] long FilePrimary, string FilePrimary,
[property: JsonPropertyName("file_sidecar")] long FileSidecar, string FileSidecar,
[property: JsonPropertyName("file_missing")] long FileMissing, string FileMissing,
[property: JsonPropertyName("file_portrait")] long FilePortrait, string FilePortrait,
[property: JsonPropertyName("file_video")] long FileVideo, string FileVideo,
[property: JsonPropertyName("file_duration")] long FileDuration, string FileDuration,
[property: JsonPropertyName("file_fps")] object FileFps, string FileFps,
[property: JsonPropertyName("file_frames")] object FileFrames, string FileFrames,
[property: JsonPropertyName("file_width")] int FileWidth, int FileWidth,
[property: JsonPropertyName("file_height")] int FileHeight, int FileHeight,
[property: JsonPropertyName("file_orientation")] int FileOrientation, string FileOrientation,
[property: JsonPropertyName("file_projection")] string FileProjection, string FileOrientationSrc,
[property: JsonPropertyName("file_aspect_ratio")] double FileAspectRatio, string FileProjection,
[property: JsonPropertyName("file_hdr")] long FileHdr, string FileAspectRatio,
[property: JsonPropertyName("file_watermark")] long FileWatermark, string FileHdr,
[property: JsonPropertyName("file_color_profile")] string FileColorProfile, string FileWatermark,
[property: JsonPropertyName("file_main_color")] string FileMainColor, string FileColorProfile,
[property: JsonPropertyName("file_colors")] string FileColors, string FileMainColor,
[property: JsonPropertyName("file_luminance")] string FileLuminance, string FileColors,
[property: JsonPropertyName("file_diff")] long FileDiff, string FileLuminance,
[property: JsonPropertyName("file_chroma")] long FileChroma, string FileDiff,
[property: JsonPropertyName("file_software")] string FileSoftware, string FileChroma,
[property: JsonPropertyName("file_error")] string FileError, string FileSoftware,
[property: JsonPropertyName("mod_time")] long ModTime, string FileError,
[property: JsonPropertyName("created_at")] string CreatedAt, string ModTime,
[property: JsonPropertyName("created_in")] long CreatedIn, string CreatedAt,
[property: JsonPropertyName("updated_at")] string UpdatedAt, string CreatedIn,
[property: JsonPropertyName("updated_in")] long UpdatedIn, string UpdatedAt,
[property: JsonPropertyName("published_at")] object PublishedAt, string UpdatedIn,
[property: JsonPropertyName("deleted_at")] object DeletedAt object PublishedAt,
); object DeletedAt);

View File

@ -1,28 +1,25 @@
using System.Text.Json.Serialization; namespace View_by_Distance.Shared.Models;
namespace View_by_Distance.Shared.Models;
public record Marker( public record Marker(
[property: JsonPropertyName("marker_uid")] string MarkerUid, string MarkerUid,
[property: JsonPropertyName("file_uid")] string FileUid, string FileUid,
[property: JsonPropertyName("marker_type")] string MarkerType, string MarkerType,
[property: JsonPropertyName("marker_src")] string MarkerSrc, string MarkerSrc,
[property: JsonPropertyName("marker_name")] string MarkerName, string MarkerName,
[property: JsonPropertyName("marker_review")] int MarkerReview, string MarkerReview,
[property: JsonPropertyName("marker_invalid")] int MarkerInvalid, string MarkerInvalid,
[property: JsonPropertyName("subj_uid")] string SubjUid, string SubjUid,
[property: JsonPropertyName("subj_src")] string SubjSrc, string SubjSrc,
[property: JsonPropertyName("face_id")] string FaceId, string FaceId,
[property: JsonPropertyName("face_dist")] double FaceDist, string FaceDist,
[property: JsonPropertyName("x")] double X, double X,
[property: JsonPropertyName("y")] double Y, double Y,
[property: JsonPropertyName("w")] double W, double W,
[property: JsonPropertyName("h")] double H, double H,
[property: JsonPropertyName("q")] int Q, string Q,
[property: JsonPropertyName("size")] int Size, string Size,
[property: JsonPropertyName("score")] int Score, double Score,
[property: JsonPropertyName("thumb")] string Thumb, string Thumb,
[property: JsonPropertyName("matched_at")] string MatchedAt, string MatchedAt,
[property: JsonPropertyName("created_at")] string CreatedAt, string CreatedAt,
[property: JsonPropertyName("updated_at")] string UpdatedAt string UpdatedAt);
);