diff --git a/JSMR.Application/Common/ISupportedLanguage.cs b/JSMR.Application/Common/ISupportedLanguage.cs
index 16157ea..ac3e51f 100644
--- a/JSMR.Application/Common/ISupportedLanguage.cs
+++ b/JSMR.Application/Common/ISupportedLanguage.cs
@@ -1,7 +1,7 @@
namespace JSMR.Application.Common;
-public interface ISupportedLanguage
-{
- string Code { get; }
- Language Language { get; }
-}
\ No newline at end of file
+//public interface ISupportedLanguage
+//{
+// string Code { get; }
+// Language Language { get; }
+//}
\ No newline at end of file
diff --git a/JSMR.Application/Common/Locale.cs b/JSMR.Application/Enums/Locale.cs
similarity index 73%
rename from JSMR.Application/Common/Locale.cs
rename to JSMR.Application/Enums/Locale.cs
index 7f5af84..a8ed2b9 100644
--- a/JSMR.Application/Common/Locale.cs
+++ b/JSMR.Application/Enums/Locale.cs
@@ -1,4 +1,4 @@
-namespace JSMR.Application.Common;
+namespace JSMR.Application.Enums;
public enum Locale
{
diff --git a/JSMR.Application/Integrations/DLSite/Models/VoiceWorkDetails.cs b/JSMR.Application/Integrations/DLSite/Models/VoiceWorkDetails.cs
index 37fd25b..4c46ae1 100644
--- a/JSMR.Application/Integrations/DLSite/Models/VoiceWorkDetails.cs
+++ b/JSMR.Application/Integrations/DLSite/Models/VoiceWorkDetails.cs
@@ -1,4 +1,5 @@
-using JSMR.Application.Common;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
namespace JSMR.Application.Integrations.DLSite.Models;
@@ -10,7 +11,7 @@ public class VoiceWorkDetails
public int WishlistCount { get; init; }
public int DownloadCount { get; init; }
public DateTime? RegistrationDate { get; init; }
- public ISupportedLanguage[] SupportedLanguages { get; init; } = [];
+ public SupportedLanguage[] SupportedLanguages { get; init; } = [];
public AIGeneration AI { get; init; }
public bool HasTrial { get; init; }
public bool HasDLPlay { get; init; }
diff --git a/JSMR.Application/Integrations/DLSite/Models/VoiceWorkTranslation.cs b/JSMR.Application/Integrations/DLSite/Models/VoiceWorkTranslation.cs
index 6db3e7b..f94d7fb 100644
--- a/JSMR.Application/Integrations/DLSite/Models/VoiceWorkTranslation.cs
+++ b/JSMR.Application/Integrations/DLSite/Models/VoiceWorkTranslation.cs
@@ -1,4 +1,4 @@
-using JSMR.Application.Common;
+using JSMR.Domain.Enums;
namespace JSMR.Application.Integrations.DLSite.Models;
@@ -6,5 +6,6 @@ public class VoiceWorkTranslation
{
public required string OriginalProductId { get; init; }
public bool IsOfficialTranslation { get; init; }
+ public bool IsRecommendedTranslation { get; init; }
public required Language Language { get; init; }
}
\ No newline at end of file
diff --git a/JSMR.Application/JSMR.Application.csproj b/JSMR.Application/JSMR.Application.csproj
index 1ee20ff..9114e16 100644
--- a/JSMR.Application/JSMR.Application.csproj
+++ b/JSMR.Application/JSMR.Application.csproj
@@ -15,4 +15,8 @@
+
+
+
+
diff --git a/JSMR.Application/Scanning/Contracts/DLSiteWork.cs b/JSMR.Application/Scanning/Contracts/DLSiteWork.cs
index d13d7f4..203f080 100644
--- a/JSMR.Application/Scanning/Contracts/DLSiteWork.cs
+++ b/JSMR.Application/Scanning/Contracts/DLSiteWork.cs
@@ -1,4 +1,4 @@
-using JSMR.Application.Common;
+using JSMR.Domain.Enums;
namespace JSMR.Application.Scanning.Contracts;
diff --git a/JSMR.Application/Scanning/Contracts/VoiceWorkIngest.cs b/JSMR.Application/Scanning/Contracts/VoiceWorkIngest.cs
index 4a1617c..5192371 100644
--- a/JSMR.Application/Scanning/Contracts/VoiceWorkIngest.cs
+++ b/JSMR.Application/Scanning/Contracts/VoiceWorkIngest.cs
@@ -1,5 +1,6 @@
-using JSMR.Application.Common;
-using JSMR.Application.Integrations.DLSite.Models;
+using JSMR.Application.Integrations.DLSite.Models;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
namespace JSMR.Application.Scanning.Contracts;
@@ -20,10 +21,13 @@ public sealed record VoiceWorkIngest
public int? Votes { get; init; }
public AgeRating AgeRating { get; init; }
public bool HasImage { get; init; }
- public ICollection SupportedLanguages { get; init; } = [];
+ public ICollection SupportedLanguages { get; init; } = [];
public DateOnly? ExpectedDate { get; init; }
public DateOnly? SalesDate { get; init; }
public DateTime? RegistrationDate { get; init; }
+ public AIGeneration AI { get; init; }
+ public VoiceWorkSeries? Series { get; init; }
+ public VoiceWorkTranslation? Translation { get; init; }
public static VoiceWorkIngest From(DLSiteWork work, VoiceWorkDetails? details)
{
@@ -47,7 +51,10 @@ public sealed record VoiceWorkIngest
SupportedLanguages = details?.SupportedLanguages ?? [],
ExpectedDate = work.ExpectedDate,
SalesDate = work.SalesDate,
- RegistrationDate = details?.RegistrationDate
+ RegistrationDate = details?.RegistrationDate,
+ AI = details?.AI ?? AIGeneration.None,
+ Series = details?.Series,
+ Translation = details?.Translation
};
}
}
\ No newline at end of file
diff --git a/JSMR.Application/Scanning/ScanVoiceWorksRequest.cs b/JSMR.Application/Scanning/ScanVoiceWorksRequest.cs
index accae70..3f44f43 100644
--- a/JSMR.Application/Scanning/ScanVoiceWorksRequest.cs
+++ b/JSMR.Application/Scanning/ScanVoiceWorksRequest.cs
@@ -1,4 +1,4 @@
-using JSMR.Application.Common;
+using JSMR.Application.Enums;
namespace JSMR.Application.Scanning;
diff --git a/JSMR.Application/VoiceWorks/Queries/Search/VoiceWorkSearchCriteria.cs b/JSMR.Application/VoiceWorks/Queries/Search/VoiceWorkSearchCriteria.cs
index 14c83f5..c102dd1 100644
--- a/JSMR.Application/VoiceWorks/Queries/Search/VoiceWorkSearchCriteria.cs
+++ b/JSMR.Application/VoiceWorks/Queries/Search/VoiceWorkSearchCriteria.cs
@@ -1,4 +1,5 @@
-using JSMR.Application.Common;
+using JSMR.Application.Enums;
+using JSMR.Domain.Enums;
namespace JSMR.Application.VoiceWorks.Queries.Search;
diff --git a/JSMR.Application/VoiceWorks/Queries/Search/VoiceWorkSearchResult.cs b/JSMR.Application/VoiceWorks/Queries/Search/VoiceWorkSearchResult.cs
index eba90ec..d322666 100644
--- a/JSMR.Application/VoiceWorks/Queries/Search/VoiceWorkSearchResult.cs
+++ b/JSMR.Application/VoiceWorks/Queries/Search/VoiceWorkSearchResult.cs
@@ -1,4 +1,4 @@
-using JSMR.Application.Common;
+using JSMR.Domain.Enums;
namespace JSMR.Application.VoiceWorks.Queries.Search;
diff --git a/JSMR.Application/Common/AIGeneration.cs b/JSMR.Domain/Enums/AIGeneration.cs
similarity index 65%
rename from JSMR.Application/Common/AIGeneration.cs
rename to JSMR.Domain/Enums/AIGeneration.cs
index 400204a..babd4ab 100644
--- a/JSMR.Application/Common/AIGeneration.cs
+++ b/JSMR.Domain/Enums/AIGeneration.cs
@@ -1,4 +1,4 @@
-namespace JSMR.Application.Common;
+namespace JSMR.Domain.Enums;
public enum AIGeneration
{
diff --git a/JSMR.Application/Common/AgeRating.cs b/JSMR.Domain/Enums/AgeRating.cs
similarity index 64%
rename from JSMR.Application/Common/AgeRating.cs
rename to JSMR.Domain/Enums/AgeRating.cs
index d18b93d..2025336 100644
--- a/JSMR.Application/Common/AgeRating.cs
+++ b/JSMR.Domain/Enums/AgeRating.cs
@@ -1,4 +1,4 @@
-namespace JSMR.Application.Common;
+namespace JSMR.Domain.Enums;
public enum AgeRating
{
diff --git a/JSMR.Application/Common/Language.cs b/JSMR.Domain/Enums/Language.cs
similarity index 79%
rename from JSMR.Application/Common/Language.cs
rename to JSMR.Domain/Enums/Language.cs
index b93db81..fd3e6f1 100644
--- a/JSMR.Application/Common/Language.cs
+++ b/JSMR.Domain/Enums/Language.cs
@@ -1,4 +1,4 @@
-namespace JSMR.Application.Common;
+namespace JSMR.Domain.Enums;
public enum Language
{
diff --git a/JSMR.Application/Common/VoiceWorkStatus.cs b/JSMR.Domain/Enums/VoiceWorkStatus.cs
similarity index 74%
rename from JSMR.Application/Common/VoiceWorkStatus.cs
rename to JSMR.Domain/Enums/VoiceWorkStatus.cs
index bba3973..f857f40 100644
--- a/JSMR.Application/Common/VoiceWorkStatus.cs
+++ b/JSMR.Domain/Enums/VoiceWorkStatus.cs
@@ -1,4 +1,4 @@
-namespace JSMR.Application.Common;
+namespace JSMR.Domain.Enums;
public enum VoiceWorkStatus
{
diff --git a/JSMR.Domain/ValueObjects/SupportedLanguage.cs b/JSMR.Domain/ValueObjects/SupportedLanguage.cs
new file mode 100644
index 0000000..e0c71b9
--- /dev/null
+++ b/JSMR.Domain/ValueObjects/SupportedLanguage.cs
@@ -0,0 +1,39 @@
+using JSMR.Domain.Enums;
+
+namespace JSMR.Domain.ValueObjects;
+
+public sealed record SupportedLanguage(string Code, Language Language)
+{
+ public static readonly SupportedLanguage Japanese = new("JPN", Language.Japanese);
+ public static readonly SupportedLanguage English = new("ENG", Language.English);
+ public static readonly SupportedLanguage ChineseSimplified = new("CHI_HANS", Language.ChineseSimplified);
+ public static readonly SupportedLanguage ChineseTraditional = new("CHI_HANT", Language.ChineseTraditional);
+ public static readonly SupportedLanguage Korean = new("KO_KR", Language.Korean);
+ public static readonly SupportedLanguage Alingual = new("NM", Language.Unknown);
+
+ public static IReadOnlyList All =>
+ [
+ Japanese,
+ English,
+ ChineseSimplified,
+ ChineseTraditional,
+ Korean
+ ];
+
+ private static readonly Dictionary _byCode =
+ All.ToDictionary(x => x.Code, StringComparer.OrdinalIgnoreCase);
+
+ private static readonly Dictionary _byLang =
+ All.ToDictionary(x => x.Language);
+
+ public static bool TryFromCode(string code, out SupportedLanguage? supportedLanguage) =>
+ _byCode.TryGetValue(code, out supportedLanguage);
+
+ public static bool TryFromLanguage(Language lang, out SupportedLanguage? supportedLanguage) =>
+ _byLang.TryGetValue(lang, out supportedLanguage);
+
+ public static SupportedLanguage FromLanguage(Language language) =>
+ _byLang.TryGetValue(language, out var sl)
+ ? sl
+ : throw new ArgumentOutOfRangeException(nameof(language), $"Unsupported: {language}");
+}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/Common/Languages/ILanguageIdentifier.cs b/JSMR.Infrastructure/Common/Languages/ILanguageIdentifier.cs
index a619cc3..2d5ed48 100644
--- a/JSMR.Infrastructure/Common/Languages/ILanguageIdentifier.cs
+++ b/JSMR.Infrastructure/Common/Languages/ILanguageIdentifier.cs
@@ -1,4 +1,4 @@
-using JSMR.Application.Common;
+using JSMR.Domain.Enums;
namespace JSMR.Infrastructure.Common.Languages;
diff --git a/JSMR.Infrastructure/Common/Languages/LanguageIdentifier.cs b/JSMR.Infrastructure/Common/Languages/LanguageIdentifier.cs
index c814737..ba8400b 100644
--- a/JSMR.Infrastructure/Common/Languages/LanguageIdentifier.cs
+++ b/JSMR.Infrastructure/Common/Languages/LanguageIdentifier.cs
@@ -1,4 +1,4 @@
-using JSMR.Application.Common;
+using JSMR.Domain.Enums;
using NTextCat;
using System.Reflection;
diff --git a/JSMR.Infrastructure/Common/SupportedLanguages/AlingualLanguage.cs b/JSMR.Infrastructure/Common/SupportedLanguages/AlingualLanguage.cs
index 7feb8a2..01abb2a 100644
--- a/JSMR.Infrastructure/Common/SupportedLanguages/AlingualLanguage.cs
+++ b/JSMR.Infrastructure/Common/SupportedLanguages/AlingualLanguage.cs
@@ -2,8 +2,8 @@
namespace JSMR.Infrastructure.Common.SupportedLanguages;
-public class AlingualLanguage : ISupportedLanguage
-{
- public Language Language => Language.Unknown;
- public string Code => "NM";
-}
\ No newline at end of file
+//public class AlingualLanguage : ISupportedLanguage
+//{
+// public Language Language => Language.Unknown;
+// public string Code => "NM";
+//}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/Common/SupportedLanguages/ChineseLanguage.cs b/JSMR.Infrastructure/Common/SupportedLanguages/ChineseLanguage.cs
index b22a6b7..e522b23 100644
--- a/JSMR.Infrastructure/Common/SupportedLanguages/ChineseLanguage.cs
+++ b/JSMR.Infrastructure/Common/SupportedLanguages/ChineseLanguage.cs
@@ -2,8 +2,8 @@
namespace JSMR.Infrastructure.Common.SupportedLanguages;
-public class ChineseLanguage : ISupportedLanguage
-{
- public Language Language => Language.ChineseTraditional; // ???
- public string Code => "CHI";
-}
\ No newline at end of file
+//public class ChineseLanguage : ISupportedLanguage
+//{
+// public Language Language => Language.ChineseTraditional; // ???
+// public string Code => "CHI";
+//}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/Common/SupportedLanguages/DLSiteOfficialTranslationLanguage.cs b/JSMR.Infrastructure/Common/SupportedLanguages/DLSiteOfficialTranslationLanguage.cs
index e72ade9..5cec9bb 100644
--- a/JSMR.Infrastructure/Common/SupportedLanguages/DLSiteOfficialTranslationLanguage.cs
+++ b/JSMR.Infrastructure/Common/SupportedLanguages/DLSiteOfficialTranslationLanguage.cs
@@ -2,8 +2,8 @@
namespace JSMR.Infrastructure.Common.SupportedLanguages;
-public class DLSiteOfficialTranslationLanguage : ISupportedLanguage
-{
- public string Code => "DOT";
- public Language Language => Language.Unknown;
-}
\ No newline at end of file
+//public class DLSiteOfficialTranslationLanguage : ISupportedLanguage
+//{
+// public string Code => "DOT";
+// public Language Language => Language.Unknown;
+//}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/Common/SupportedLanguages/EnglishLanguage.cs b/JSMR.Infrastructure/Common/SupportedLanguages/EnglishLanguage.cs
index 049795e..a681d5e 100644
--- a/JSMR.Infrastructure/Common/SupportedLanguages/EnglishLanguage.cs
+++ b/JSMR.Infrastructure/Common/SupportedLanguages/EnglishLanguage.cs
@@ -2,8 +2,8 @@
namespace JSMR.Infrastructure.Common.SupportedLanguages;
-public class EnglishLanguage : ISupportedLanguage
-{
- public Language Language => Language.English;
- public string Code => "ENG";
-}
\ No newline at end of file
+//public class EnglishLanguage : ISupportedLanguage
+//{
+// public Language Language => Language.English;
+// public string Code => "ENG";
+//}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/Common/SupportedLanguages/JapaneseLanguage.cs b/JSMR.Infrastructure/Common/SupportedLanguages/JapaneseLanguage.cs
index 74c8405..f492292 100644
--- a/JSMR.Infrastructure/Common/SupportedLanguages/JapaneseLanguage.cs
+++ b/JSMR.Infrastructure/Common/SupportedLanguages/JapaneseLanguage.cs
@@ -2,8 +2,8 @@
namespace JSMR.Infrastructure.Common.SupportedLanguages;
-public class JapaneseLanguage : ISupportedLanguage
-{
- public Language Language => Language.Japanese;
- public string Code => "JPN";
-}
\ No newline at end of file
+//public class JapaneseLanguage : ISupportedLanguage
+//{
+// public Language Language => Language.Japanese;
+// public string Code => "JPN";
+//}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/Common/SupportedLanguages/KoreanLanguage.cs b/JSMR.Infrastructure/Common/SupportedLanguages/KoreanLanguage.cs
index 148f2a6..dd004ab 100644
--- a/JSMR.Infrastructure/Common/SupportedLanguages/KoreanLanguage.cs
+++ b/JSMR.Infrastructure/Common/SupportedLanguages/KoreanLanguage.cs
@@ -2,8 +2,8 @@
namespace JSMR.Infrastructure.Common.SupportedLanguages;
-public class KoreanLanguage : ISupportedLanguage
-{
- public Language Language => Language.Korean;
- public string Code => "KO_KR";
-}
\ No newline at end of file
+//public class KoreanLanguage : ISupportedLanguage
+//{
+// public Language Language => Language.Korean;
+// public string Code => "KO_KR";
+//}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/Common/SupportedLanguages/SimplifiedChineseLanguage.cs b/JSMR.Infrastructure/Common/SupportedLanguages/SimplifiedChineseLanguage.cs
index bc47c77..80c7585 100644
--- a/JSMR.Infrastructure/Common/SupportedLanguages/SimplifiedChineseLanguage.cs
+++ b/JSMR.Infrastructure/Common/SupportedLanguages/SimplifiedChineseLanguage.cs
@@ -2,8 +2,8 @@
namespace JSMR.Infrastructure.Common.SupportedLanguages;
-public class SimplifiedChineseLanguage : ISupportedLanguage
-{
- public Language Language => Language.ChineseSimplified;
- public string Code => "CHI_HANS";
-}
\ No newline at end of file
+//public class SimplifiedChineseLanguage : ISupportedLanguage
+//{
+// public Language Language => Language.ChineseSimplified;
+// public string Code => "CHI_HANS";
+//}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/Common/SupportedLanguages/TraditionalChineseLanguage.cs b/JSMR.Infrastructure/Common/SupportedLanguages/TraditionalChineseLanguage.cs
index bfbb411..76a2884 100644
--- a/JSMR.Infrastructure/Common/SupportedLanguages/TraditionalChineseLanguage.cs
+++ b/JSMR.Infrastructure/Common/SupportedLanguages/TraditionalChineseLanguage.cs
@@ -2,8 +2,8 @@
namespace JSMR.Infrastructure.Common.SupportedLanguages;
-public class TraditionalChineseLanguage : ISupportedLanguage
-{
- public Language Language => Language.ChineseTraditional;
- public string Code => "CHI_HANT";
-}
\ No newline at end of file
+//public class TraditionalChineseLanguage : ISupportedLanguage
+//{
+// public Language Language => Language.ChineseTraditional;
+// public string Code => "CHI_HANT";
+//}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/DI/InfrastructureServiceCollectionExtensions.cs b/JSMR.Infrastructure/DI/InfrastructureServiceCollectionExtensions.cs
index 9011622..6ef80bb 100644
--- a/JSMR.Infrastructure/DI/InfrastructureServiceCollectionExtensions.cs
+++ b/JSMR.Infrastructure/DI/InfrastructureServiceCollectionExtensions.cs
@@ -1,10 +1,10 @@
using JSMR.Application.Circles.Queries.GetCreators;
using JSMR.Application.Circles.Queries.GetTags;
using JSMR.Application.Circles.Queries.Search;
-using JSMR.Application.Common;
using JSMR.Application.Common.Caching;
using JSMR.Application.Creators.Ports;
using JSMR.Application.Creators.Queries.Search.Ports;
+using JSMR.Application.Enums;
using JSMR.Application.Scanning.Ports;
using JSMR.Application.Tags.Ports;
using JSMR.Application.Tags.Queries.Search.Ports;
@@ -44,11 +44,11 @@ public static class InfrastructureServiceCollectionExtensions
services.AddKeyedScoped(Locale.Japanese);
services.AddKeyedScoped(Locale.English);
- services.AddKeyedScoped(Locale.Japanese);
- services.AddKeyedScoped(Locale.English);
- services.AddKeyedScoped(Locale.ChineseSimplified);
- services.AddKeyedScoped(Locale.ChineseTraditional);
- services.AddKeyedScoped(Locale.Korean);
+ //services.AddKeyedScoped(Locale.Japanese);
+ //services.AddKeyedScoped(Locale.English);
+ //services.AddKeyedScoped(Locale.ChineseSimplified);
+ //services.AddKeyedScoped(Locale.ChineseTraditional);
+ //services.AddKeyedScoped(Locale.Korean);
services.AddScoped();
services.AddScoped();
diff --git a/JSMR.Infrastructure/Data/Repositories/VoiceWorks/VoiceWorkSearchProvider.cs b/JSMR.Infrastructure/Data/Repositories/VoiceWorks/VoiceWorkSearchProvider.cs
index 6ebf13d..5d4693a 100644
--- a/JSMR.Infrastructure/Data/Repositories/VoiceWorks/VoiceWorkSearchProvider.cs
+++ b/JSMR.Infrastructure/Data/Repositories/VoiceWorks/VoiceWorkSearchProvider.cs
@@ -1,7 +1,7 @@
-using JSMR.Application.Common;
-using JSMR.Application.Common.Search;
+using JSMR.Application.Common.Search;
using JSMR.Application.VoiceWorks.Queries.Search;
using JSMR.Domain.Entities;
+using JSMR.Domain.Enums;
using JSMR.Infrastructure.Common.Queries;
using Microsoft.EntityFrameworkCore;
using System.Linq.Expressions;
diff --git a/JSMR.Infrastructure/Ingestion/EnglishVoiceWorkUpdater.cs b/JSMR.Infrastructure/Ingestion/EnglishVoiceWorkUpdater.cs
index 3a094f2..93320ad 100644
--- a/JSMR.Infrastructure/Ingestion/EnglishVoiceWorkUpdater.cs
+++ b/JSMR.Infrastructure/Ingestion/EnglishVoiceWorkUpdater.cs
@@ -1,7 +1,7 @@
-using JSMR.Application.Common;
-using JSMR.Application.Scanning.Contracts;
+using JSMR.Application.Scanning.Contracts;
using JSMR.Application.Scanning.Ports;
using JSMR.Domain.Entities;
+using JSMR.Domain.Enums;
using JSMR.Infrastructure.Common.Languages;
using JSMR.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
diff --git a/JSMR.Infrastructure/Ingestion/VoiceWorkUpdater.cs b/JSMR.Infrastructure/Ingestion/VoiceWorkUpdater.cs
index c00dd3f..3eac0a3 100644
--- a/JSMR.Infrastructure/Ingestion/VoiceWorkUpdater.cs
+++ b/JSMR.Infrastructure/Ingestion/VoiceWorkUpdater.cs
@@ -1,7 +1,8 @@
-using JSMR.Application.Common;
-using JSMR.Application.Scanning.Contracts;
+using JSMR.Application.Scanning.Contracts;
using JSMR.Application.Scanning.Ports;
using JSMR.Domain.Entities;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Common.Time;
using JSMR.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
@@ -40,6 +41,7 @@ public class VoiceWorkUpdater(AppDbContext dbContext, ITimeProvider timeProvider
string[] productIds = [.. ingests.Select(i => i.ProductId).Distinct()];
string[] tagNames = [.. ingests.SelectMany(i => i.Tags).Distinct()];
string[] creatorNames = [.. ingests.SelectMany(i => i.Creators).Distinct()];
+ string[] seriesIdentifiers = [.. ingests.Where(i => i.Series is not null).Select(i => i.Series!.Identifier).Distinct()];
DateTimeOffset currentScanAnchor = GetCurrentScanAnchor();
DateTimeOffset previousScanAnchor = PreviousScanAnchor(currentScanAnchor);
@@ -63,6 +65,9 @@ public class VoiceWorkUpdater(AppDbContext dbContext, ITimeProvider timeProvider
Creators: await dbContext.Creators
.Where(cr => creatorNames.Contains(cr.Name))
.ToDictionaryAsync(cr => cr.Name, cancellationToken),
+ Series: await dbContext.Series
+ .Where(s => seriesIdentifiers.Contains(s.Identifier))
+ .ToDictionaryAsync(s => s.Identifier, cancellationToken),
Results: productIds.ToDictionary(
productId => productId,
productId => new VoiceWorkUpsertResult()
@@ -135,6 +140,7 @@ public class VoiceWorkUpdater(AppDbContext dbContext, ITimeProvider timeProvider
UpsertCreators(ingest, upsertContext);
UpsertVoiceWorkCreators(ingest, upsertContext);
UpsertVoiceWorkSupportedLanguages(ingest, upsertContext);
+ UpsertSeries(ingest, upsertContext);
return dbContext.Entry(voiceWork).State switch
{
@@ -183,6 +189,8 @@ public class VoiceWorkUpdater(AppDbContext dbContext, ITimeProvider timeProvider
voiceWork.HasChobit = ingest.HasDLPlay;
voiceWork.StarRating = ingest.StarRating;
voiceWork.Votes = ingest.Votes;
+ voiceWork.OriginalProductId = ingest.Translation?.OriginalProductId;
+ voiceWork.AIGeneration = (byte)ingest.AI;
voiceWork.IsValid = true;
voiceWork.LastScannedDate = ComputeLastScannedDate(voiceWork.LastScannedDate, state, upsertContext);
@@ -365,7 +373,7 @@ public class VoiceWorkUpdater(AppDbContext dbContext, ITimeProvider timeProvider
VoiceWork voiceWork = upsertContext.VoiceWorks[ingest.ProductId];
Dictionary existingLanguageLinks = voiceWork.SupportedLanguages.ToDictionary(x => x.Language);
- foreach (ISupportedLanguage supportedLanguage in ingest.SupportedLanguages)
+ foreach (SupportedLanguage supportedLanguage in ingest.SupportedLanguages)
{
if (!existingLanguageLinks.TryGetValue(supportedLanguage.Code, out VoiceWorkSupportedLanguage? voiceWorkSupportedLanguage))
{
@@ -379,4 +387,39 @@ public class VoiceWorkUpdater(AppDbContext dbContext, ITimeProvider timeProvider
}
}
}
+
+ private void UpsertSeries(VoiceWorkIngest ingest, VoiceWorkUpsertContext upsertContext)
+ {
+ Series? series = TryGetOrAddSeries(ingest, upsertContext);
+
+ VoiceWork voiceWork = upsertContext.VoiceWorks[ingest.ProductId];
+ voiceWork.Series = series;
+ }
+
+ private Series? TryGetOrAddSeries(VoiceWorkIngest ingest, VoiceWorkUpsertContext upsertContext)
+ {
+ if (ingest.Series is null)
+ return null;
+
+ Circle circle = upsertContext.Circles[ingest.MakerId];
+
+ if (!upsertContext.Series.TryGetValue(ingest.Series.Identifier, out Series? series))
+ {
+ series = new Series
+ {
+ Name = ingest.Series.Name,
+ Identifier = ingest.Series.Identifier,
+ Circle = circle
+ };
+
+ dbContext.Series.Add(series);
+ upsertContext.Series[ingest.Series.Identifier] = series;
+ }
+ else
+ {
+ series.Identifier = ingest.Series.Identifier;
+ }
+
+ return series;
+ }
}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/Ingestion/VoiceWorkUpsertContext.cs b/JSMR.Infrastructure/Ingestion/VoiceWorkUpsertContext.cs
index 28bb975..5c6f63f 100644
--- a/JSMR.Infrastructure/Ingestion/VoiceWorkUpsertContext.cs
+++ b/JSMR.Infrastructure/Ingestion/VoiceWorkUpsertContext.cs
@@ -10,6 +10,7 @@ public record VoiceWorkUpsertContext(
Dictionary VoiceWorks,
Dictionary Tags,
Dictionary Creators,
+ Dictionary Series,
Dictionary Results
);
diff --git a/JSMR.Infrastructure/Integrations/DLSite/Mapping/DLSiteToDomainMapper.cs b/JSMR.Infrastructure/Integrations/DLSite/Mapping/DLSiteToDomainMapper.cs
index 1b5dd95..78a980b 100644
--- a/JSMR.Infrastructure/Integrations/DLSite/Mapping/DLSiteToDomainMapper.cs
+++ b/JSMR.Infrastructure/Integrations/DLSite/Mapping/DLSiteToDomainMapper.cs
@@ -1,6 +1,6 @@
-using JSMR.Application.Common;
-using JSMR.Application.Integrations.DLSite.Models;
-using JSMR.Infrastructure.Common.SupportedLanguages;
+using JSMR.Application.Integrations.DLSite.Models;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Integrations.DLSite.Models;
namespace JSMR.Infrastructure.Integrations.DLSite.Mapping;
@@ -11,26 +11,25 @@ public static class DLSiteToDomainMapper
private const string OptDLPlay = "DLP";
private const string OptReviews = "REV";
private const string OptOfficialTranslation = "DOT";
+ private const string OptRecommendedTranslation = "VET";
private const string OptAIFull = "AIG";
private const string OptAIPartial = "AIP";
private static readonly (string Code, Language Lang)[] SupportedLanguageFlags =
[
- ("JPN", Language.Japanese),
- ("ENG", Language.English),
- ("CHI", Language.ChineseTraditional),
- ("CHI_HANT", Language.ChineseTraditional),
- ("CHI_HANS", Language.ChineseSimplified)
+ (SupportedLanguage.Japanese.Code, Language.Japanese),
+ (SupportedLanguage.English.Code, Language.English),
+ (SupportedLanguage.ChineseTraditional.Code, Language.ChineseTraditional),
+ (SupportedLanguage.ChineseSimplified.Code, Language.ChineseSimplified)
];
- private static readonly (string Code, ISupportedLanguage Lang)[] SupportedLanguageFlags2 =
+ private static readonly (string Code, SupportedLanguage Lang)[] SupportedLanguageFlags2 =
[
- ("JPN", new JapaneseLanguage()),
- ("ENG", new EnglishLanguage()),
- ("CHI", new ChineseLanguage()),
- ("CHI_HANT", new TraditionalChineseLanguage()),
- ("CHI_HANS", new SimplifiedChineseLanguage())
+ (SupportedLanguage.Japanese.Code, SupportedLanguage.Japanese),
+ (SupportedLanguage.English.Code, SupportedLanguage.English),
+ (SupportedLanguage.ChineseTraditional.Code, SupportedLanguage.ChineseTraditional),
+ (SupportedLanguage.ChineseSimplified.Code, SupportedLanguage.ChineseSimplified)
];
private static readonly Dictionary TranslationLanguageMap =
@@ -114,18 +113,20 @@ public static class DLSiteToDomainMapper
string originalId = translationInfo.OriginalWorkNumber;
bool isOfficial = options.Contains(OptOfficialTranslation);
+ bool isRecommended = options.Contains(OptRecommendedTranslation);
return new VoiceWorkTranslation
{
OriginalProductId = originalId,
Language = language,
- IsOfficialTranslation = isOfficial
+ IsOfficialTranslation = isOfficial,
+ IsRecommendedTranslation = isRecommended
};
}
- private static ISupportedLanguage[] MapSupportedLanguages(HashSet options)
+ private static SupportedLanguage[] MapSupportedLanguages(HashSet options)
{
- List languages = [];
+ List languages = [];
foreach (var (code, language) in SupportedLanguageFlags2)
{
diff --git a/JSMR.Infrastructure/Scanning/DLSiteSearchFilterBuilder.cs b/JSMR.Infrastructure/Scanning/DLSiteSearchFilterBuilder.cs
index deb5753..bcf94f8 100644
--- a/JSMR.Infrastructure/Scanning/DLSiteSearchFilterBuilder.cs
+++ b/JSMR.Infrastructure/Scanning/DLSiteSearchFilterBuilder.cs
@@ -1,6 +1,5 @@
-using JSMR.Application.Common;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Common.Locales;
-using JSMR.Infrastructure.Common.SupportedLanguages;
namespace JSMR.Infrastructure.Scanning;
@@ -35,9 +34,9 @@ public class DLSiteSearchFilterBuilder
return this;
}
- public DLSiteSearchFilterBuilder IncludeSupportedLanguages(ISupportedLanguage[] languages)
+ public DLSiteSearchFilterBuilder IncludeSupportedLanguages(SupportedLanguage[] languages)
{
- foreach (ISupportedLanguage language in languages)
+ foreach (SupportedLanguage language in languages)
{
IncludeSupportedLanguage(language);
}
@@ -45,7 +44,7 @@ public class DLSiteSearchFilterBuilder
return this;
}
- public DLSiteSearchFilterBuilder IncludeSupportedLanguage(ISupportedLanguage language)
+ public DLSiteSearchFilterBuilder IncludeSupportedLanguage(SupportedLanguage language)
{
AddToOptionsAnd(language.Code);
diff --git a/JSMR.Infrastructure/Scanning/DLSiteSearchFilterBuilderExtensions.cs b/JSMR.Infrastructure/Scanning/DLSiteSearchFilterBuilderExtensions.cs
index 3404f73..7ad942d 100644
--- a/JSMR.Infrastructure/Scanning/DLSiteSearchFilterBuilderExtensions.cs
+++ b/JSMR.Infrastructure/Scanning/DLSiteSearchFilterBuilderExtensions.cs
@@ -1,4 +1,5 @@
-using JSMR.Infrastructure.Common.Locales;
+using JSMR.Domain.ValueObjects;
+using JSMR.Infrastructure.Common.Locales;
using JSMR.Infrastructure.Common.SupportedLanguages;
namespace JSMR.Infrastructure.Scanning;
@@ -17,36 +18,31 @@ public static class DLSiteSearchFilterBuilderExtensions
public static DLSiteSearchFilterBuilder IncludeJapaneseSupportedLanguage(this DLSiteSearchFilterBuilder searchFilterBuilder)
{
- return searchFilterBuilder.IncludeSupportedLanguage(new JapaneseLanguage());
+ return searchFilterBuilder.IncludeSupportedLanguage(SupportedLanguage.Japanese);
}
public static DLSiteSearchFilterBuilder IncludeEnglishSupportedLanguage(this DLSiteSearchFilterBuilder searchFilterBuilder)
{
- return searchFilterBuilder.IncludeSupportedLanguage(new EnglishLanguage());
- }
-
- public static DLSiteSearchFilterBuilder IncludeChineseSupportedLanguage(this DLSiteSearchFilterBuilder searchFilterBuilder)
- {
- return searchFilterBuilder.IncludeSupportedLanguage(new ChineseLanguage());
+ return searchFilterBuilder.IncludeSupportedLanguage(SupportedLanguage.English);
}
public static DLSiteSearchFilterBuilder IncludeSimplifiedChineseSupportedLanguage(this DLSiteSearchFilterBuilder searchFilterBuilder)
{
- return searchFilterBuilder.IncludeSupportedLanguage(new SimplifiedChineseLanguage());
+ return searchFilterBuilder.IncludeSupportedLanguage(SupportedLanguage.ChineseSimplified);
}
public static DLSiteSearchFilterBuilder IncludeTraditionalChineseSupportedLanguage(this DLSiteSearchFilterBuilder searchFilterBuilder)
{
- return searchFilterBuilder.IncludeSupportedLanguage(new TraditionalChineseLanguage());
+ return searchFilterBuilder.IncludeSupportedLanguage(SupportedLanguage.ChineseTraditional);
}
public static DLSiteSearchFilterBuilder IncludeKoreanSupportedLanguage(this DLSiteSearchFilterBuilder searchFilterBuilder)
{
- return searchFilterBuilder.IncludeSupportedLanguage(new KoreanLanguage());
+ return searchFilterBuilder.IncludeSupportedLanguage(SupportedLanguage.Korean);
}
public static DLSiteSearchFilterBuilder IncludeAlingualSupportedLanguage(this DLSiteSearchFilterBuilder searchFilterBuilder)
{
- return searchFilterBuilder.IncludeSupportedLanguage(new AlingualLanguage());
+ return searchFilterBuilder.IncludeSupportedLanguage(SupportedLanguage.Alingual);
}
}
\ No newline at end of file
diff --git a/JSMR.Infrastructure/Scanning/EnglishVoiceWorksScanner.cs b/JSMR.Infrastructure/Scanning/EnglishVoiceWorksScanner.cs
index 1d67e0a..872fb1c 100644
--- a/JSMR.Infrastructure/Scanning/EnglishVoiceWorksScanner.cs
+++ b/JSMR.Infrastructure/Scanning/EnglishVoiceWorksScanner.cs
@@ -1,4 +1,5 @@
using JSMR.Application.Common;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Common.Locales;
using JSMR.Infrastructure.Common.SupportedLanguages;
using JSMR.Infrastructure.Http;
@@ -17,11 +18,11 @@ public partial class EnglishVoiceWorksScanner(IHtmlLoader loader) : VoiceWorksSc
protected override ILocale Locale => new EnglishLocale();
- protected override ISupportedLanguage[] SupportedLanguages =>
+ protected override SupportedLanguage[] SupportedLanguages =>
[
- new JapaneseLanguage(),
- new EnglishLanguage(),
- new AlingualLanguage()
+ SupportedLanguage.Japanese,
+ SupportedLanguage.English,
+ SupportedLanguage.Alingual
];
protected override DateOnly? GetEstimatedReleaseDate(string expectedDate)
diff --git a/JSMR.Infrastructure/Scanning/JapaneseVoiceWorksScanner.cs b/JSMR.Infrastructure/Scanning/JapaneseVoiceWorksScanner.cs
index d71b160..fb3ec45 100644
--- a/JSMR.Infrastructure/Scanning/JapaneseVoiceWorksScanner.cs
+++ b/JSMR.Infrastructure/Scanning/JapaneseVoiceWorksScanner.cs
@@ -1,4 +1,5 @@
using JSMR.Application.Common;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Common.Locales;
using JSMR.Infrastructure.Common.SupportedLanguages;
using JSMR.Infrastructure.Http;
@@ -16,14 +17,14 @@ public partial class JapaneseVoiceWorksScanner(IHtmlLoader loader) : VoiceWorksS
protected override ILocale Locale => new JapaneseLocale();
- protected override ISupportedLanguage[] SupportedLanguages =>
+ protected override SupportedLanguage[] SupportedLanguages =>
[
- new JapaneseLanguage(),
- new EnglishLanguage(),
- new TraditionalChineseLanguage(),
- new SimplifiedChineseLanguage(),
- new KoreanLanguage(),
- new AlingualLanguage()
+ SupportedLanguage.Japanese,
+ SupportedLanguage.English,
+ SupportedLanguage.ChineseTraditional,
+ SupportedLanguage.ChineseSimplified,
+ SupportedLanguage.Korean,
+ SupportedLanguage.Alingual
];
protected override DateOnly? GetEstimatedReleaseDate(string expectedDate)
diff --git a/JSMR.Infrastructure/Scanning/VoiceWorksScanner.cs b/JSMR.Infrastructure/Scanning/VoiceWorksScanner.cs
index bef7869..b39ad50 100644
--- a/JSMR.Infrastructure/Scanning/VoiceWorksScanner.cs
+++ b/JSMR.Infrastructure/Scanning/VoiceWorksScanner.cs
@@ -1,21 +1,20 @@
using HtmlAgilityPack;
-using JSMR.Application.Common;
using JSMR.Application.Scanning.Contracts;
using JSMR.Application.Scanning.Ports;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Common.Locales;
-using JSMR.Infrastructure.Common.SupportedLanguages;
using JSMR.Infrastructure.Http;
using JSMR.Infrastructure.Scanning.Models;
using System.Globalization;
using System.Text.RegularExpressions;
-using System.Xml.Linq;
namespace JSMR.Infrastructure.Scanning;
public abstract class VoiceWorksScanner(IHtmlLoader htmlLoader) : IVoiceWorksScanner
{
protected abstract ILocale Locale { get; }
- protected abstract ISupportedLanguage[] SupportedLanguages { get; }
+ protected abstract SupportedLanguage[] SupportedLanguages { get; }
protected abstract DateOnly? GetEstimatedReleaseDate(string expectedDate);
protected abstract DateOnly? GetSalesDate(string salesDate);
diff --git a/JSMR.Tests/Fixtures/VoiceWorkSearchProviderFixture.cs b/JSMR.Tests/Fixtures/VoiceWorkSearchProviderFixture.cs
index 715bf37..c8018fa 100644
--- a/JSMR.Tests/Fixtures/VoiceWorkSearchProviderFixture.cs
+++ b/JSMR.Tests/Fixtures/VoiceWorkSearchProviderFixture.cs
@@ -1,4 +1,4 @@
-using JSMR.Application.Common;
+using JSMR.Domain.Enums;
using JSMR.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
diff --git a/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Insert_With_Spam_Circle_Tests.cs b/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Insert_With_Spam_Circle_Tests.cs
index 89cadb7..9d3e822 100644
--- a/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Insert_With_Spam_Circle_Tests.cs
+++ b/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Insert_With_Spam_Circle_Tests.cs
@@ -1,8 +1,8 @@
-using JSMR.Application.Common;
-using JSMR.Application.Scanning.Contracts;
+using JSMR.Application.Scanning.Contracts;
using JSMR.Application.Scanning.Ports;
using JSMR.Domain.Entities;
-using JSMR.Infrastructure.Common.SupportedLanguages;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Data;
using JSMR.Tests.Fixtures;
using Microsoft.EntityFrameworkCore;
@@ -32,7 +32,7 @@ public class Fail_Attempted_Insert_With_Spam_Circle_Tests(MariaDbContainerFixtur
HasDLPlay = false,
AgeRating = AgeRating.R18,
HasImage = false,
- SupportedLanguages = [new JapaneseLanguage()],
+ SupportedLanguages = [SupportedLanguage.Japanese],
SalesDate = null,
ExpectedDate = new DateOnly(2025, 2, 1)
};
diff --git a/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Update_With_Decreased_Downloads_Tests.cs b/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Update_With_Decreased_Downloads_Tests.cs
index c63cdac..c70d390 100644
--- a/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Update_With_Decreased_Downloads_Tests.cs
+++ b/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Update_With_Decreased_Downloads_Tests.cs
@@ -1,8 +1,8 @@
-using JSMR.Application.Common;
-using JSMR.Application.Scanning.Contracts;
+using JSMR.Application.Scanning.Contracts;
using JSMR.Application.Scanning.Ports;
using JSMR.Domain.Entities;
-using JSMR.Infrastructure.Common.SupportedLanguages;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Data;
using JSMR.Tests.Fixtures;
using Microsoft.EntityFrameworkCore;
@@ -34,7 +34,7 @@ public class Fail_Attempted_Update_With_Decreased_Downloads_Tests(MariaDbContain
Votes = null,
AgeRating = AgeRating.AllAges,
HasImage = true,
- SupportedLanguages = [new JapaneseLanguage()],
+ SupportedLanguages = [SupportedLanguage.Japanese],
SalesDate = new DateOnly(2025, 1, 15),
ExpectedDate = null
};
diff --git a/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Update_With_Sales_Date_Reversal_Tests.cs b/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Update_With_Sales_Date_Reversal_Tests.cs
index cb76f32..05ef31a 100644
--- a/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Update_With_Sales_Date_Reversal_Tests.cs
+++ b/JSMR.Tests/Ingestion/Japanese/Fail_Attempted_Update_With_Sales_Date_Reversal_Tests.cs
@@ -1,8 +1,8 @@
-using JSMR.Application.Common;
-using JSMR.Application.Scanning.Contracts;
+using JSMR.Application.Scanning.Contracts;
using JSMR.Application.Scanning.Ports;
using JSMR.Domain.Entities;
-using JSMR.Infrastructure.Common.SupportedLanguages;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Data;
using JSMR.Tests.Fixtures;
using Microsoft.EntityFrameworkCore;
@@ -34,7 +34,7 @@ public class Fail_Attempted_Update_With_Sales_Date_Reversal_Tests(MariaDbContain
Votes = null,
AgeRating = AgeRating.AllAges,
HasImage = true,
- SupportedLanguages = [new JapaneseLanguage()],
+ SupportedLanguages = [SupportedLanguage.Japanese],
SalesDate = new DateOnly(2025, 1, 15),
ExpectedDate = null
};
diff --git a/JSMR.Tests/Ingestion/Japanese/Insert_New_Release_And_Scan_Again_Later_Tests.cs b/JSMR.Tests/Ingestion/Japanese/Insert_New_Release_And_Scan_Again_Later_Tests.cs
index b6ed659..4870ecc 100644
--- a/JSMR.Tests/Ingestion/Japanese/Insert_New_Release_And_Scan_Again_Later_Tests.cs
+++ b/JSMR.Tests/Ingestion/Japanese/Insert_New_Release_And_Scan_Again_Later_Tests.cs
@@ -1,7 +1,7 @@
-using JSMR.Application.Common;
-using JSMR.Application.Scanning.Contracts;
+using JSMR.Application.Scanning.Contracts;
using JSMR.Domain.Entities;
-using JSMR.Infrastructure.Common.SupportedLanguages;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Data;
using JSMR.Tests.Fixtures;
using Microsoft.EntityFrameworkCore;
@@ -33,7 +33,7 @@ public class Insert_New_Release_And_Scan_Again_Later_Tests(MariaDbContainerFixtu
Votes = null,
AgeRating = AgeRating.AllAges,
HasImage = true,
- SupportedLanguages = [new JapaneseLanguage()],
+ SupportedLanguages = [SupportedLanguage.Japanese],
SalesDate = new DateOnly(2025, 1, 15),
ExpectedDate = null
};
diff --git a/JSMR.Tests/Ingestion/Japanese/Insert_New_Release_With_New_Tags_And_Creators_Tests.cs b/JSMR.Tests/Ingestion/Japanese/Insert_New_Release_With_New_Tags_And_Creators_Tests.cs
index a3a868a..a2b90b9 100644
--- a/JSMR.Tests/Ingestion/Japanese/Insert_New_Release_With_New_Tags_And_Creators_Tests.cs
+++ b/JSMR.Tests/Ingestion/Japanese/Insert_New_Release_With_New_Tags_And_Creators_Tests.cs
@@ -1,8 +1,8 @@
-using JSMR.Application.Common;
-using JSMR.Application.Scanning.Contracts;
+using JSMR.Application.Scanning.Contracts;
using JSMR.Application.Scanning.Ports;
using JSMR.Domain.Entities;
-using JSMR.Infrastructure.Common.SupportedLanguages;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Data;
using JSMR.Tests.Fixtures;
using Microsoft.EntityFrameworkCore;
@@ -34,7 +34,7 @@ public class Insert_New_Release_With_New_Tags_And_Creators_Tests(MariaDbContaine
Votes = null,
AgeRating = AgeRating.AllAges,
HasImage = true,
- SupportedLanguages = [new JapaneseLanguage()],
+ SupportedLanguages = [SupportedLanguage.Japanese],
SalesDate = new DateOnly(2025, 1, 15),
ExpectedDate = null
};
diff --git a/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_And_Scan_Again_Later_Tests.cs b/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_And_Scan_Again_Later_Tests.cs
index cc54d7f..44b3a71 100644
--- a/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_And_Scan_Again_Later_Tests.cs
+++ b/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_And_Scan_Again_Later_Tests.cs
@@ -1,7 +1,7 @@
-using JSMR.Application.Common;
-using JSMR.Application.Scanning.Contracts;
+using JSMR.Application.Scanning.Contracts;
using JSMR.Domain.Entities;
-using JSMR.Infrastructure.Common.SupportedLanguages;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Data;
using JSMR.Tests.Fixtures;
using Microsoft.EntityFrameworkCore;
@@ -31,7 +31,7 @@ public class Insert_New_Upcoming_And_Scan_Again_Later_Tests(MariaDbContainerFixt
HasDLPlay = false,
AgeRating = AgeRating.AllAges,
HasImage = false,
- SupportedLanguages = [new JapaneseLanguage()],
+ SupportedLanguages = [SupportedLanguage.Japanese],
SalesDate = null,
ExpectedDate = new DateOnly(2025, 2, 1)
};
diff --git a/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_Release_Same_Day_Tests.cs b/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_Release_Same_Day_Tests.cs
index cbbfcaa..9962069 100644
--- a/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_Release_Same_Day_Tests.cs
+++ b/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_Release_Same_Day_Tests.cs
@@ -1,7 +1,7 @@
-using JSMR.Application.Common;
-using JSMR.Application.Scanning.Contracts;
+using JSMR.Application.Scanning.Contracts;
using JSMR.Domain.Entities;
-using JSMR.Infrastructure.Common.SupportedLanguages;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Data;
using JSMR.Tests.Fixtures;
using Microsoft.EntityFrameworkCore;
@@ -31,7 +31,7 @@ public class Insert_New_Upcoming_Release_Same_Day_Tests(MariaDbContainerFixture
HasDLPlay = false,
AgeRating = AgeRating.AllAges,
HasImage = false,
- SupportedLanguages = [new JapaneseLanguage()],
+ SupportedLanguages = [SupportedLanguage.Japanese],
SalesDate = null,
ExpectedDate = new DateOnly(2025, 2, 1)
};
diff --git a/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_With_Existing_Tags_And_Creators_Tests.cs b/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_With_Existing_Tags_And_Creators_Tests.cs
index 9966a2c..85690bc 100644
--- a/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_With_Existing_Tags_And_Creators_Tests.cs
+++ b/JSMR.Tests/Ingestion/Japanese/Insert_New_Upcoming_With_Existing_Tags_And_Creators_Tests.cs
@@ -1,8 +1,8 @@
-using JSMR.Application.Common;
-using JSMR.Application.Scanning.Contracts;
+using JSMR.Application.Scanning.Contracts;
using JSMR.Application.Scanning.Ports;
using JSMR.Domain.Entities;
-using JSMR.Infrastructure.Common.SupportedLanguages;
+using JSMR.Domain.Enums;
+using JSMR.Domain.ValueObjects;
using JSMR.Infrastructure.Data;
using JSMR.Tests.Fixtures;
using Microsoft.EntityFrameworkCore;
@@ -34,7 +34,7 @@ public class Insert_New_Upcoming_With_Existing_Tags_And_Creators_Tests(MariaDbCo
Votes = null,
AgeRating = AgeRating.R15,
HasImage = true,
- SupportedLanguages = [new JapaneseLanguage()],
+ SupportedLanguages = [SupportedLanguage.Japanese],
SalesDate = null,
ExpectedDate = new DateOnly(2025, 1, 20),
RegistrationDate = null
diff --git a/JSMR.Tests/Ingestion/VoiceWorkIngestionTests.cs b/JSMR.Tests/Ingestion/VoiceWorkIngestionTests.cs
index ce28af6..9e042c4 100644
--- a/JSMR.Tests/Ingestion/VoiceWorkIngestionTests.cs
+++ b/JSMR.Tests/Ingestion/VoiceWorkIngestionTests.cs
@@ -2,7 +2,6 @@
using JSMR.Application.Scanning.Contracts;
using JSMR.Application.Scanning.Ports;
using JSMR.Domain.Entities;
-using JSMR.Infrastructure.Common.SupportedLanguages;
using JSMR.Infrastructure.Common.Time;
using JSMR.Infrastructure.Data;
using JSMR.Infrastructure.Ingestion;
diff --git a/JSMR.Tests/Ingestion/VoiceWorkUpsertFixture.cs b/JSMR.Tests/Ingestion/VoiceWorkUpsertFixture.cs
index 6a7a86e..1b88df7 100644
--- a/JSMR.Tests/Ingestion/VoiceWorkUpsertFixture.cs
+++ b/JSMR.Tests/Ingestion/VoiceWorkUpsertFixture.cs
@@ -1,4 +1,4 @@
-using JSMR.Application.Common;
+using JSMR.Domain.Enums;
using JSMR.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
diff --git a/JSMR.Tests/Integrations/DLSite/DLSiteClientTests.cs b/JSMR.Tests/Integrations/DLSite/DLSiteClientTests.cs
index af58717..b2699b6 100644
--- a/JSMR.Tests/Integrations/DLSite/DLSiteClientTests.cs
+++ b/JSMR.Tests/Integrations/DLSite/DLSiteClientTests.cs
@@ -1,5 +1,5 @@
-using JSMR.Application.Common;
-using JSMR.Application.Integrations.DLSite.Models;
+using JSMR.Application.Integrations.DLSite.Models;
+using JSMR.Domain.Enums;
using JSMR.Infrastructure.Http;
using JSMR.Infrastructure.Integrations.DLSite;
using JSMR.Infrastructure.Integrations.DLSite.Mapping;