Enhance movie import process and metadata handling
Refactored the movie import functionality to ensure that the title from the source is used for the show name, while the file name is retained as the original title. Improved the handling of metadata during the import process, allowing for better integration of original titles from various sources. Updated related classes and methods to streamline the import workflow and enhance user experience. Added tests to verify the correct assignment of titles and original names during the import process. Updated documentation to reflect these changes.
This commit is contained in:
+4
-3
@@ -129,7 +129,7 @@ public sealed class BuildGridPromptQueryHandler(IAppDbContext dbContext, GroupCa
|
||||
var genre = group.PrimaryGenreId is { } id ? genres.GetValueOrDefault(id) : null;
|
||||
text.AppendLine(
|
||||
Culture,
|
||||
$"| {group.Name} | {Kind(group.DominantKind)} | {group.UnitCount} | "
|
||||
$"| {group.Name} | {KindName(group.DominantKind)} | {group.UnitCount} | "
|
||||
+ $"{(int)Math.Round(group.AverageUnitMinutes)} мин | "
|
||||
+ $"{group.Strictest?.ToString() ?? "—"} | {genre ?? "—"} |"
|
||||
);
|
||||
@@ -162,7 +162,7 @@ public sealed class BuildGridPromptQueryHandler(IAppDbContext dbContext, GroupCa
|
||||
var genre = show.PrimaryGenreId is { } id ? genres.GetValueOrDefault(id) : null;
|
||||
text.AppendLine(
|
||||
Culture,
|
||||
$"| {show.Name} | {Kind(show.Kind)} | {show.Year?.ToString(Culture) ?? "—"} | "
|
||||
$"| {show.Name} | {KindName(show.Kind)} | {show.Year?.ToString(Culture) ?? "—"} | "
|
||||
+ $"{show.Units} | {show.AverageMinutes} мин | "
|
||||
+ $"{show.Audience?.ToString() ?? "—"} | {genre ?? "—"} |"
|
||||
);
|
||||
@@ -186,7 +186,8 @@ public sealed class BuildGridPromptQueryHandler(IAppDbContext dbContext, GroupCa
|
||||
text.AppendLine(names.Count == 0 ? empty : string.Join(", ", names));
|
||||
}
|
||||
|
||||
private static string Kind(ShowKind kind) =>
|
||||
/// <summary>Тип контента словами: «сериал», «полный метр» — так его читает модель.</summary>
|
||||
private static string KindName(ShowKind kind) =>
|
||||
kind switch
|
||||
{
|
||||
ShowKind.Series => "сериал",
|
||||
|
||||
Reference in New Issue
Block a user