add filler option to duration playout mode (#428)
* add duration tail options to schedule items editor * add naive filler scheduling * fix duration item length in xmltv * show offline image for unfilled duration tail * fix tests * update changelog * update dependencies
This commit is contained in:
+3343
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,158 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Add_DurationTail : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "OfflineTail",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
newName: "TailMode");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TailCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TailCollectionType",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TailMediaItemId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TailMultiCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TailSmartCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProgramScheduleDurationItem_TailCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
column: "TailCollectionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProgramScheduleDurationItem_TailMediaItemId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
column: "TailMediaItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProgramScheduleDurationItem_TailMultiCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
column: "TailMultiCollectionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProgramScheduleDurationItem_TailSmartCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
column: "TailSmartCollectionId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_Collection_TailCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
column: "TailCollectionId",
|
||||
principalTable: "Collection",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_MediaItem_TailMediaItemId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
column: "TailMediaItemId",
|
||||
principalTable: "MediaItem",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_MultiCollection_TailMultiCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
column: "TailMultiCollectionId",
|
||||
principalTable: "MultiCollection",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_SmartCollection_TailSmartCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
column: "TailSmartCollectionId",
|
||||
principalTable: "SmartCollection",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_Collection_TailCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_MediaItem_TailMediaItemId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_MultiCollection_TailMultiCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_SmartCollection_TailSmartCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ProgramScheduleDurationItem_TailCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ProgramScheduleDurationItem_TailMediaItemId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ProgramScheduleDurationItem_TailMultiCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ProgramScheduleDurationItem_TailSmartCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TailCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TailCollectionType",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TailMediaItemId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TailMultiCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TailSmartCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "TailMode",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
newName: "OfflineTail");
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+3346
File diff suppressed because it is too large
Load Diff
+23
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Add_PlayoutAnchor_InDurationFiller : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "Anchor_InDurationFiller",
|
||||
table: "Playout",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Anchor_InDurationFiller",
|
||||
table: "Playout");
|
||||
}
|
||||
}
|
||||
}
|
||||
+3349
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Add_PlayoutItem_IsFiller : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsFiller",
|
||||
table: "PlayoutItem",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsFiller",
|
||||
table: "PlayoutItem");
|
||||
}
|
||||
}
|
||||
}
|
||||
+3352
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Add_PlayoutItem_GuideFinish : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "GuideFinish",
|
||||
table: "PlayoutItem",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GuideFinish",
|
||||
table: "PlayoutItem");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1097,6 +1097,12 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
b.Property<DateTime>("Finish")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime?>("GuideFinish")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsFiller")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("MediaItemId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
@@ -1808,12 +1814,35 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
|
||||
|
||||
b.Property<bool>("OfflineTail")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<TimeSpan>("PlayoutDuration")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("TailCollectionId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("TailCollectionType")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("TailMediaItemId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("TailMode")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("TailMultiCollectionId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("TailSmartCollectionId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasIndex("TailCollectionId");
|
||||
|
||||
b.HasIndex("TailMediaItemId");
|
||||
|
||||
b.HasIndex("TailMultiCollectionId");
|
||||
|
||||
b.HasIndex("TailSmartCollectionId");
|
||||
|
||||
b.ToTable("ProgramScheduleDurationItem");
|
||||
});
|
||||
|
||||
@@ -2422,6 +2451,9 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
b1.Property<DateTime?>("DurationFinish")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b1.Property<bool>("InDurationFiller")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b1.Property<bool>("InFlood")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
@@ -2903,6 +2935,33 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
.HasForeignKey("ErsatzTV.Core.Domain.ProgramScheduleItemDuration", "Id")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.Collection", "TailCollection")
|
||||
.WithMany()
|
||||
.HasForeignKey("TailCollectionId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.MediaItem", "TailMediaItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("TailMediaItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.MultiCollection", "TailMultiCollection")
|
||||
.WithMany()
|
||||
.HasForeignKey("TailMultiCollectionId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.SmartCollection", "TailSmartCollection")
|
||||
.WithMany()
|
||||
.HasForeignKey("TailSmartCollectionId");
|
||||
|
||||
b.Navigation("TailCollection");
|
||||
|
||||
b.Navigation("TailMediaItem");
|
||||
|
||||
b.Navigation("TailMultiCollection");
|
||||
|
||||
b.Navigation("TailSmartCollection");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemFlood", b =>
|
||||
|
||||
Reference in New Issue
Block a user