Refactor various components to improve code clarity and maintainability. Update ListUsersQueryHandler to utilize UserListFilter for parameter handling. Refactor BumperSpecFactory and related classes to encapsulate input parameters into dedicated records, enhancing readability. Adjust MediaAsset and Slot classes to streamline content updates with new content models. Improve BumperRenderBackgroundService and MediaProcessingBackgroundService to use MediaReadyInfo for asset readiness, ensuring consistent parameter management across the application.
This commit is contained in:
@@ -142,13 +142,15 @@ public sealed class GridScheduleGenerator(
|
||||
ToEntryKind(item.Kind),
|
||||
item.StartsAtUtc,
|
||||
item.EndsAtUtc,
|
||||
item.ShowId,
|
||||
item.UnitIndex,
|
||||
item.SlotId,
|
||||
item.Trace is null
|
||||
? null
|
||||
: JsonSerializer.Serialize(item.Trace, TraceJsonOptions),
|
||||
item.CollectionId
|
||||
new ScheduleEntryOrigin(
|
||||
item.ShowId,
|
||||
item.UnitIndex,
|
||||
item.SlotId,
|
||||
item.Trace is null
|
||||
? null
|
||||
: JsonSerializer.Serialize(item.Trace, TraceJsonOptions),
|
||||
item.CollectionId
|
||||
)
|
||||
)
|
||||
);
|
||||
added++;
|
||||
|
||||
+12
-10
@@ -208,16 +208,18 @@ public sealed class CopyTemplateCommandHandler(IAppDbContext dbContext)
|
||||
slot.SnapToMinutes
|
||||
);
|
||||
copySlot.UpdateContent(
|
||||
slot.Title,
|
||||
slot.SlotKind,
|
||||
slot.GroupId,
|
||||
slot.StrategyJson,
|
||||
slot.RepeatSourceJson,
|
||||
slot.BlockMode,
|
||||
slot.BlockValue,
|
||||
slot.OverflowPolicy,
|
||||
Map(slot.JunctionBetweenId, junctionMap),
|
||||
Map(slot.JunctionAfterId, junctionMap)
|
||||
new SlotContent(
|
||||
slot.Title,
|
||||
slot.SlotKind,
|
||||
slot.GroupId,
|
||||
slot.StrategyJson,
|
||||
slot.RepeatSourceJson,
|
||||
slot.BlockMode,
|
||||
slot.BlockValue,
|
||||
slot.OverflowPolicy,
|
||||
Map(slot.JunctionBetweenId, junctionMap),
|
||||
Map(slot.JunctionAfterId, junctionMap)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,16 +66,18 @@ public sealed class SlotWriter(IAppDbContext dbContext)
|
||||
input.SnapToMinutes
|
||||
);
|
||||
target.UpdateContent(
|
||||
input.Title,
|
||||
input.SlotKind,
|
||||
input.GroupId,
|
||||
input.Strategy?.ToJson(),
|
||||
input.RepeatSource?.ToJson(),
|
||||
input.BlockMode,
|
||||
input.BlockValue,
|
||||
input.OverflowPolicy,
|
||||
input.JunctionBetweenId,
|
||||
input.JunctionAfterId
|
||||
new SlotContent(
|
||||
input.Title,
|
||||
input.SlotKind,
|
||||
input.GroupId,
|
||||
input.Strategy?.ToJson(),
|
||||
input.RepeatSource?.ToJson(),
|
||||
input.BlockMode,
|
||||
input.BlockValue,
|
||||
input.OverflowPolicy,
|
||||
input.JunctionBetweenId,
|
||||
input.JunctionAfterId
|
||||
)
|
||||
);
|
||||
|
||||
return Result.Success();
|
||||
|
||||
Reference in New Issue
Block a user