Implement episode metadata management: add functionality to refresh episode metadata from external sources, including new API endpoints and UI integration. Enhance Show and Episode models to support additional metadata fields, and update database schema accordingly. Update ShowDetail and ShowMetadataCard components to display refreshed episode information and provide user feedback on metadata updates.
This commit is contained in:
@@ -104,7 +104,8 @@ public sealed class FfmpegBumperRenderer(
|
||||
var font = EscapePath(spec.FontFile);
|
||||
var outStart = Math.Max(0, target - 1);
|
||||
|
||||
// Вход 0 — видеофон: загруженный файл (петля + масштаб/кроп) либо анимированный градиент.
|
||||
// Вход 0 — видеофон: загруженный файл (петля + масштаб/кроп), постер шоу (затемнённый) либо
|
||||
// анимированный градиент.
|
||||
var inputs = new List<string>();
|
||||
string videoPrefix;
|
||||
if (!string.IsNullOrEmpty(spec.BackgroundFile))
|
||||
@@ -117,6 +118,15 @@ public sealed class FfmpegBumperRenderer(
|
||||
videoPrefix =
|
||||
$"[0:v]scale={w}:{h}:force_original_aspect_ratio=increase,crop={w}:{h},fps=30,format=yuv420p";
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(spec.PosterFile))
|
||||
{
|
||||
// Постер (портрет) растягиваем на кадр, размываем и затемняем, чтобы текст читался.
|
||||
inputs.AddRange(["-loop", "1", "-i", spec.PosterFile]);
|
||||
videoPrefix =
|
||||
$"[0:v]scale={w}:{h}:force_original_aspect_ratio=increase,crop={w}:{h}"
|
||||
+ ",boxblur=6:1,eq=brightness=-0.28:saturation=0.9"
|
||||
+ ",fps=30,format=yuv420p";
|
||||
}
|
||||
else
|
||||
{
|
||||
var gradient =
|
||||
|
||||
@@ -55,6 +55,17 @@ public sealed class MediaPathResolver
|
||||
public string MetadataShowPosterRelative(Guid showId, string extension) =>
|
||||
$"metadata/shows/{showId:N}/poster{extension}";
|
||||
|
||||
public string MetadataEpisodeDir(Guid episodeId) =>
|
||||
EnsureWithinRoot(Path.Combine(MetadataDir, "episodes", episodeId.ToString("N")));
|
||||
|
||||
public string MetadataEpisodeStillPath(Guid episodeId, string extension) =>
|
||||
EnsureWithinRoot(
|
||||
Path.Combine(MetadataDir, "episodes", episodeId.ToString("N"), "still" + extension)
|
||||
);
|
||||
|
||||
public string MetadataEpisodeStillRelative(Guid episodeId, string extension) =>
|
||||
$"metadata/episodes/{episodeId:N}/still{extension}";
|
||||
|
||||
/// <summary>Абсолютный путь по относительному (с защитой от traversal) или null, если вне корня.</summary>
|
||||
public string? ResolveRelative(string relativePath)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user