Browse Source

fix a couple ui errors (#2551)

pull/2552/head
Jason Dove 10 months ago committed by GitHub
parent
commit
fcce53a3df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      CHANGELOG.md
  2. 1
      ErsatzTV.Application/Scheduling/Commands/CreateDecoHandler.cs
  3. 2
      ErsatzTV.Application/Scheduling/Commands/ReplaceBlockItems.cs
  4. 8
      ErsatzTV.Application/Scheduling/Commands/ReplaceBlockItemsHandler.cs

2
CHANGELOG.md

@ -42,6 +42,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix QSV capability detection on Linux using non-drm displays (e.g. wayland) - Fix QSV capability detection on Linux using non-drm displays (e.g. wayland)
- Fix playlist filtering bug that made HLS Segmenter more likely to fail when streaming for multiple hours - Fix playlist filtering bug that made HLS Segmenter more likely to fail when streaming for multiple hours
- Fix NVIDIA overlaying text subtitles and permanent watermark on 10-bit content - Fix NVIDIA overlaying text subtitles and permanent watermark on 10-bit content
- Fix UI error adding deco
- Fix UI error editing watermarks and graphics elements on blocks
### Changed ### Changed
- Do not use graphics engine for single, permanent watermark - Do not use graphics engine for single, permanent watermark

1
ErsatzTV.Application/Scheduling/Commands/CreateDecoHandler.cs

@ -30,6 +30,7 @@ public class CreateDecoHandler(IDbContextFactory<TvContext> dbContextFactory)
{ {
DecoGroupId = request.DecoGroupId, DecoGroupId = request.DecoGroupId,
Name = name, Name = name,
BreakContent = [],
DecoWatermarks = [], DecoWatermarks = [],
DecoGraphicsElements = [] DecoGraphicsElements = []
}); });

2
ErsatzTV.Application/Scheduling/Commands/ReplaceBlockItems.cs

@ -10,4 +10,4 @@ public record ReplaceBlockItems(
int Minutes, int Minutes,
BlockStopScheduling StopScheduling, BlockStopScheduling StopScheduling,
List<ReplaceBlockItem> Items) List<ReplaceBlockItem> Items)
: IRequest<Either<BaseError, List<BlockItemViewModel>>>; : IRequest<Either<BaseError, Unit>>;

8
ErsatzTV.Application/Scheduling/Commands/ReplaceBlockItemsHandler.cs

@ -8,9 +8,9 @@ using Microsoft.EntityFrameworkCore;
namespace ErsatzTV.Application.Scheduling; namespace ErsatzTV.Application.Scheduling;
public class ReplaceBlockItemsHandler(IDbContextFactory<TvContext> dbContextFactory) public class ReplaceBlockItemsHandler(IDbContextFactory<TvContext> dbContextFactory)
: IRequestHandler<ReplaceBlockItems, Either<BaseError, List<BlockItemViewModel>>> : IRequestHandler<ReplaceBlockItems, Either<BaseError, Unit>>
{ {
public async Task<Either<BaseError, List<BlockItemViewModel>>> Handle( public async Task<Either<BaseError, Unit>> Handle(
ReplaceBlockItems request, ReplaceBlockItems request,
CancellationToken cancellationToken) CancellationToken cancellationToken)
{ {
@ -19,7 +19,7 @@ public class ReplaceBlockItemsHandler(IDbContextFactory<TvContext> dbContextFact
return await validation.Apply(ps => Persist(dbContext, request, ps, cancellationToken)); return await validation.Apply(ps => Persist(dbContext, request, ps, cancellationToken));
} }
private static async Task<List<BlockItemViewModel>> Persist( private static async Task<Unit> Persist(
TvContext dbContext, TvContext dbContext,
ReplaceBlockItems request, ReplaceBlockItems request,
Block block, Block block,
@ -41,7 +41,7 @@ public class ReplaceBlockItemsHandler(IDbContextFactory<TvContext> dbContextFact
// await _channel.WriteAsync(new BuildPlayout(playout.Id, PlayoutBuildMode.Refresh)); // await _channel.WriteAsync(new BuildPlayout(playout.Id, PlayoutBuildMode.Refresh));
// } // }
return block.Items.Map(Mapper.ProjectToViewModel).ToList(); return Unit.Default;
} }
private static BlockItem BuildItem(Block block, int index, ReplaceBlockItem item) private static BlockItem BuildItem(Block block, int index, ReplaceBlockItem item)

Loading…
Cancel
Save