fix(app): bound deco template item times to a single day (#144 S4 review)
Out-of-range TimeSpans (25:00:00, 1.06:00:00, negatives) previously persisted raw while the read side projected .TimeOfDay, so display and playout behavior diverged silently. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -99,6 +99,13 @@ public class ReplaceDecoTemplateItemsHandler(IDbContextFactory<TvContext> dbCont
|
||||
|
||||
foreach (DecoTemplateItemRange item in itemsWithEffectiveEnd)
|
||||
{
|
||||
if (item.StartTime < TimeSpan.Zero || item.StartTime >= TimeSpan.FromHours(24) ||
|
||||
item.EndTime < TimeSpan.Zero || item.EndTime > TimeSpan.FromHours(24))
|
||||
{
|
||||
return BaseError.New(
|
||||
$"Deco from {item.StartTime} to {item.EndTime} must be within a single day (00:00 to 24:00)");
|
||||
}
|
||||
|
||||
if (item.StartTime >= item.EffectiveEndTime)
|
||||
{
|
||||
return BaseError.New(
|
||||
|
||||
Reference in New Issue
Block a user