Added additional voice work update logic.

This commit is contained in:
2025-10-11 17:28:39 -04:00
parent db0c3349a2
commit 278b6df650
38 changed files with 56745 additions and 64 deletions

View File

@@ -0,0 +1,7 @@
namespace JSMR.Application.Common;
public interface ISupportedLanguage
{
string Code { get; }
Language Language { get; }
}

View File

@@ -6,10 +6,11 @@ public class VoiceWorkDetails
{
public VoiceWorkSeries? Series { get; init; }
public VoiceWorkTranslation? Translation { get; init; }
public AgeRating AgeRating { get; init; }
public int WishlistCount { get; init; }
public int DownloadCount { get; init; }
public DateTime? RegistrationDate { get; init; }
public Language[] SupportedLanguages { get; init; } = [];
public ISupportedLanguage[] SupportedLanguages { get; init; } = [];
public AIGeneration AI { get; init; }
public bool HasTrial { get; init; }
public bool HasDLPlay { get; init; }

View File

@@ -1,4 +1,6 @@
namespace JSMR.Application.Scanning.Contracts;
using JSMR.Application.Common;
namespace JSMR.Application.Scanning.Contracts;
public class DLSiteWork
{
@@ -19,6 +21,7 @@ public class DLSiteWork
public bool HasTrial { get; set;}
public ICollection<string> Tags { get; set; } = [];
public ICollection<string> Creators { get; set; } = [];
public string? ImageUrl { get; set; }
public string? SmallImageUrl { get; set; }
public required string ImageUrl { get; set; }
public required string SmallImageUrl { get; set; }
public AgeRating AgeRating { get; set; }
}

View File

@@ -1,4 +1,5 @@
using JSMR.Application.Integrations.DLSite.Models;
using JSMR.Application.Common;
using JSMR.Application.Integrations.DLSite.Models;
namespace JSMR.Application.Scanning.Contracts;
@@ -17,5 +18,11 @@ public record VoiceWorkIngest(DLSiteWork Work, VoiceWorkDetails? Details)
public bool HasDLPlay { get; init; } = Details?.HasDLPlay ?? false;
public byte? StarRating { get; init; } = Work.StarRating;
public int? Votes { get; init; } = Work.Votes;
public AgeRating AgeRating { get; init; } = Details?.AgeRating ?? Work.AgeRating;
public bool HasImage { get; init; } = Work.ImageUrl.Contains("no_img") == false;
public ICollection<ISupportedLanguage> SupportedLanguages { get; init; } = Details?.SupportedLanguages ?? [];
public DateOnly? ExpectedDate { get; init; } = Work.ExpectedDate;
public DateOnly? SalesDate { get; init; } = Work.SalesDate;
public DateTime? RegistrationDate { get; init; } = Details?.RegistrationDate;
// TODO: Other properties
}