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:
@ -1,3 +1,4 @@
|
||||
using ImmichToSlideshow.Domain;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
@ -10,11 +11,9 @@ public sealed record Identifier(string[] DirectoryNames,
|
||||
int Id,
|
||||
long Length,
|
||||
string PaddedId,
|
||||
long Ticks)
|
||||
{
|
||||
long Ticks) {
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
public override string ToString() {
|
||||
string result = JsonSerializer.Serialize(this, IdentifierSourceGenerationContext.Default.Identifier);
|
||||
return result;
|
||||
}
|
||||
@ -22,6 +21,9 @@ public sealed record Identifier(string[] DirectoryNames,
|
||||
internal static string GetDeviceAssetIds(ReadOnlyCollection<Identifier> identifiers) =>
|
||||
$"'{string.Join($"',{Environment.NewLine}'", (from l in identifiers select GetDeviceAssetId(l)).ToArray())}'";
|
||||
|
||||
internal static string GetDeviceAssetIds(ReadOnlyCollection<ImageTag> imageTags) =>
|
||||
$"'{string.Join($"',{Environment.NewLine}'", (from l in imageTags select l.Name).ToArray())}'";
|
||||
|
||||
internal static string GetDeviceAssetId(Identifier identifier) =>
|
||||
$"{identifier.PaddedId}{identifier.Extension}";
|
||||
|
||||
@ -29,12 +31,10 @@ public sealed record Identifier(string[] DirectoryNames,
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(Identifier))]
|
||||
public partial class IdentifierSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
public partial class IdentifierSourceGenerationContext : JsonSerializerContext {
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(Identifier[]))]
|
||||
public partial class IdentifierCollectionSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
public partial class IdentifierCollectionSourceGenerationContext : JsonSerializerContext {
|
||||
}
|
Reference in New Issue
Block a user