filler rework (#449)
* add chapter statistics and new filler options * refactor playout builder * more refactor prep for filler * rewrite schedulers * refactor collectionkey * add tail filler kind * migrate tail filler to filler preset * optionally show filler * fix playout detail row count * remove duration tail filler options * implement tail and fallback in flood scheduler * implement tail and fallback in one scheduler * implement tail and fallback in multiple scheduler * implement looping fallback filler * more duration tests * start to add post-roll filler to flood * rework playoutitem filler tagging * rework scheduler logging * calculate whether configured filler will fit * implement pre-roll and post-roll duration and count filler * improve duration filler calculation * add minutes to search index * update channel guide to work with new filler * add mid-roll filler * don't clone enumerators for filler calculations * support pre-roll and post-roll pad filler * implement mid-roll pad filler * allow clearing filler selections in schedule editor * fix tests * filler config validation * use consistent time zone for tests
This commit is contained in:
+140
@@ -0,0 +1,140 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Add_ProgramScheduleItem_TailFiller : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_FallbackFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_MidRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_PostRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_PreRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TailFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProgramScheduleItem_TailFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "TailFillerId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_FallbackFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "FallbackFillerId",
|
||||
principalTable: "FillerPreset",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_MidRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "MidRollFillerId",
|
||||
principalTable: "FillerPreset",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_PostRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "PostRollFillerId",
|
||||
principalTable: "FillerPreset",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_PreRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "PreRollFillerId",
|
||||
principalTable: "FillerPreset",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_TailFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "TailFillerId",
|
||||
principalTable: "FillerPreset",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_FallbackFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_MidRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_PostRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_PreRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_TailFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ProgramScheduleItem_TailFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TailFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_FallbackFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "FallbackFillerId",
|
||||
principalTable: "FillerPreset",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_MidRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "MidRollFillerId",
|
||||
principalTable: "FillerPreset",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_PostRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "PostRollFillerId",
|
||||
principalTable: "FillerPreset",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_FillerPreset_PreRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "PreRollFillerId",
|
||||
principalTable: "FillerPreset",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user