DigiKam4 Archive

Change to only need the one json file and changed AppSettings to not need a binder file

Editorconfig for no new line before open braces

Nuget package bumps

Database lowest-version-history
This commit is contained in:
2025-07-27 16:03:47 -07:00
parent ab90adee42
commit c4d42d79a0
31 changed files with 644 additions and 458 deletions

View File

@ -0,0 +1,11 @@
using System.Text.Json.Serialization;
namespace ImmichToSlideshow.Models.DigiKam;
public record AlbumRoots([property: JsonPropertyName("caseSensitivity")] int CaseSensitivity,
[property: JsonPropertyName("id")] int Id,
[property: JsonPropertyName("identifier")] string Identifier,
[property: JsonPropertyName("label")] string Label,
[property: JsonPropertyName("specificPath")] string SpecificPath,
[property: JsonPropertyName("status")] int Status,
[property: JsonPropertyName("type")] int Type);

View File

@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace ImmichToSlideshow.Models.DigiKam;
public record Albums([property: JsonPropertyName("albumRoot")] int AlbumRoot,
[property: JsonPropertyName("caption")] object Caption,
[property: JsonPropertyName("collection")] object Collection,
[property: JsonPropertyName("date")] string Date,
[property: JsonPropertyName("icon")] object Icon,
[property: JsonPropertyName("id")] int Id,
[property: JsonPropertyName("modificationDate")] DateTime ModificationDate,
[property: JsonPropertyName("relativePath")] string RelativePath);

View File

@ -0,0 +1,11 @@
using System.Text.Json.Serialization;
namespace ImmichToSlideshow.Models.DigiKam;
public record ImageComments([property: JsonPropertyName("author")] object Author,
[property: JsonPropertyName("comment")] string Comment,
[property: JsonPropertyName("date")] object Date,
[property: JsonPropertyName("id")] int Id,
[property: JsonPropertyName("imageid")] int ImageId,
[property: JsonPropertyName("language")] string Language,
[property: JsonPropertyName("type")] int Type);

View File

@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace ImmichToSlideshow.Models.DigiKam;
public record ImagePositions([property: JsonPropertyName("accuracy")] object Accuracy,
[property: JsonPropertyName("altitude")] double? Altitude,
[property: JsonPropertyName("description")] object Description,
[property: JsonPropertyName("imageid")] int ImageId,
[property: JsonPropertyName("latitude")] string Latitude,
[property: JsonPropertyName("latitudeNumber")] double? LatitudeNumber,
[property: JsonPropertyName("longitude")] string Longitude,
[property: JsonPropertyName("longitudeNumber")] double? LongitudeNumber,
[property: JsonPropertyName("orientation")] object Orientation,
[property: JsonPropertyName("roll")] object Roll,
[property: JsonPropertyName("tilt")] object Tilt);

View File

@ -0,0 +1,8 @@
using System.Text.Json.Serialization;
namespace ImmichToSlideshow.Models.DigiKam;
public record ImageTagProperties([property: JsonPropertyName("imageid")] int ImageId,
[property: JsonPropertyName("property")] string Property,
[property: JsonPropertyName("tagid")] int TagId,
[property: JsonPropertyName("value")] string Value);

View File

@ -0,0 +1,21 @@
using System.Collections.ObjectModel;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace ImmichToSlideshow.Models.DigiKam;
public record ImageTags([property: JsonPropertyName("imageid")] int ImageId,
[property: JsonPropertyName("tagid")] int TagId) {
internal static ReadOnlyCollection<ImageTags>? GetImageTags(string? path) {
ImageTags[]? results;
if (string.IsNullOrEmpty(path) || !File.Exists(path)) {
results = null;
} else {
string json = File.ReadAllText(path);
results = JsonSerializer.Deserialize<ImageTags[]>(json);
}
return results?.AsReadOnly();
}
}

View File

@ -0,0 +1,28 @@
using System.Collections.ObjectModel;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace ImmichToSlideshow.Models.DigiKam;
public record Images([property: JsonPropertyName("album")] int? Album,
[property: JsonPropertyName("category")] int Category,
[property: JsonPropertyName("fileSize")] object FileSize,
[property: JsonPropertyName("id")] int Id,
[property: JsonPropertyName("manualOrder")] object ManualOrder,
[property: JsonPropertyName("modificationDate")] DateTime ModificationDate,
[property: JsonPropertyName("name")] string Name,
[property: JsonPropertyName("status")] int Status,
[property: JsonPropertyName("uniqueHash")] string UniqueHash) {
internal static ReadOnlyCollection<Images>? GetImages(string? path) {
Images[]? results;
if (string.IsNullOrEmpty(path) || !File.Exists(path)) {
results = null;
} else {
string json = File.ReadAllText(path);
results = JsonSerializer.Deserialize<Images[]>(json);
}
return results?.AsReadOnly();
}
}

View File

@ -0,0 +1,7 @@
using System.Text.Json.Serialization;
namespace ImmichToSlideshow.Models.DigiKam;
public record TagProperties([property: JsonPropertyName("property")] string Property,
[property: JsonPropertyName("tagid")] int TagId,
[property: JsonPropertyName("value")] object Value);

View File

@ -0,0 +1,24 @@
using System.Collections.ObjectModel;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace ImmichToSlideshow.Models.DigiKam;
public record Tags([property: JsonPropertyName("icon")] object Icon,
[property: JsonPropertyName("iconkde")] object IconKDE,
[property: JsonPropertyName("id")] int Id,
[property: JsonPropertyName("name")] string Name,
[property: JsonPropertyName("pid")] int PId) {
internal static ReadOnlyCollection<Tags>? GetTags(string? path) {
Tags[]? results;
if (string.IsNullOrEmpty(path) || !File.Exists(path)) {
results = null;
} else {
string json = File.ReadAllText(path);
results = JsonSerializer.Deserialize<Tags[]>(json);
}
return results?.AsReadOnly();
}
}