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:
+3551
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Add_MediaChapter : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MediaChapter",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
MediaVersionId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ChapterId = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
StartTime = table.Column<TimeSpan>(type: "TEXT", nullable: false),
|
||||
EndTime = table.Column<TimeSpan>(type: "TEXT", nullable: false),
|
||||
Title = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MediaChapter", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_MediaChapter_MediaVersion_MediaVersionId",
|
||||
column: x => x.MediaVersionId,
|
||||
principalTable: "MediaVersion",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MediaChapter_MediaVersionId",
|
||||
table: "MediaChapter",
|
||||
column: "MediaVersionId");
|
||||
|
||||
migrationBuilder.Sql("UPDATE MediaVersion SET DateUpdated = '0001-01-01 00:00:00'");
|
||||
migrationBuilder.Sql("UPDATE LibraryFolder SET Etag = NULL");
|
||||
migrationBuilder.Sql("UPDATE EmbyMovie SET Etag = NULL");
|
||||
migrationBuilder.Sql("UPDATE EmbyShow SET Etag = NULL");
|
||||
migrationBuilder.Sql("UPDATE EmbySeason SET Etag = NULL");
|
||||
migrationBuilder.Sql("UPDATE EmbyEpisode SET Etag = NULL");
|
||||
migrationBuilder.Sql("UPDATE JellyfinMovie SET Etag = NULL");
|
||||
migrationBuilder.Sql("UPDATE JellyfinShow SET Etag = NULL");
|
||||
migrationBuilder.Sql("UPDATE JellyfinSeason SET Etag = NULL");
|
||||
migrationBuilder.Sql("UPDATE JellyfinEpisode SET Etag = NULL");
|
||||
migrationBuilder.Sql("UPDATE LibraryPath SET LastScan = '0001-01-01 00:00:00'");
|
||||
migrationBuilder.Sql("UPDATE Library SET LastScan = '0001-01-01 00:00:00'");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "MediaChapter");
|
||||
}
|
||||
}
|
||||
}
|
||||
+3684
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,256 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Add_FillerPreset : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_SmartCollection_TailSmartCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleItem_SmartCollection_SmartCollectionId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "FallbackFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MidRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PostRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PreRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FillerPreset",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: true),
|
||||
FillerKind = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
FillerMode = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Duration = table.Column<TimeSpan>(type: "TEXT", nullable: true),
|
||||
Count = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
PadToNearestMinute = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
CollectionType = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
CollectionId = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
MediaItemId = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
MultiCollectionId = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
SmartCollectionId = table.Column<int>(type: "INTEGER", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FillerPreset", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_FillerPreset_Collection_CollectionId",
|
||||
column: x => x.CollectionId,
|
||||
principalTable: "Collection",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_FillerPreset_MediaItem_MediaItemId",
|
||||
column: x => x.MediaItemId,
|
||||
principalTable: "MediaItem",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_FillerPreset_MultiCollection_MultiCollectionId",
|
||||
column: x => x.MultiCollectionId,
|
||||
principalTable: "MultiCollection",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_FillerPreset_SmartCollection_SmartCollectionId",
|
||||
column: x => x.SmartCollectionId,
|
||||
principalTable: "SmartCollection",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProgramScheduleItem_FallbackFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "FallbackFillerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProgramScheduleItem_MidRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "MidRollFillerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProgramScheduleItem_PostRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "PostRollFillerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProgramScheduleItem_PreRollFillerId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "PreRollFillerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FillerPreset_CollectionId",
|
||||
table: "FillerPreset",
|
||||
column: "CollectionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FillerPreset_MediaItemId",
|
||||
table: "FillerPreset",
|
||||
column: "MediaItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FillerPreset_MultiCollectionId",
|
||||
table: "FillerPreset",
|
||||
column: "MultiCollectionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FillerPreset_SmartCollectionId",
|
||||
table: "FillerPreset",
|
||||
column: "SmartCollectionId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_SmartCollection_TailSmartCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
column: "TailSmartCollectionId",
|
||||
principalTable: "SmartCollection",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
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);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_SmartCollection_SmartCollectionId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "SmartCollectionId",
|
||||
principalTable: "SmartCollection",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_SmartCollection_TailSmartCollectionId",
|
||||
table: "ProgramScheduleDurationItem");
|
||||
|
||||
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_SmartCollection_SmartCollectionId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "FillerPreset");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ProgramScheduleItem_FallbackFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ProgramScheduleItem_MidRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ProgramScheduleItem_PostRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ProgramScheduleItem_PreRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FallbackFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MidRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PostRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PreRollFillerId",
|
||||
table: "ProgramScheduleItem");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleDurationItem_SmartCollection_TailSmartCollectionId",
|
||||
table: "ProgramScheduleDurationItem",
|
||||
column: "TailSmartCollectionId",
|
||||
principalTable: "SmartCollection",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProgramScheduleItem_SmartCollection_SmartCollectionId",
|
||||
table: "ProgramScheduleItem",
|
||||
column: "SmartCollectionId",
|
||||
principalTable: "SmartCollection",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+3696
File diff suppressed because it is too large
Load Diff
+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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+3696
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Migrate_TailFiller_FillerPreset : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql(
|
||||
@"
|
||||
insert into FillerPreset (Name, FillerKind, FillerMode, CollectionType, MediaItemId, CollectionId, MultiCollectionId, SmartCollectionId)
|
||||
select
|
||||
'Migrated_Filler_' || TailCollectionType || '_' || ifnull(TailCollectionId, '') || '_' || ifnull(TailMediaItemId, '') || '_' || ifnull(TailMultiCollectionId, '') || '_' || ifnull(TailSmartCollectionId, ''),
|
||||
4,
|
||||
0,
|
||||
TailCollectionType,
|
||||
TailMediaItemId,
|
||||
TailCollectionId,
|
||||
TailMultiCollectionId,
|
||||
TailSmartCollectionId
|
||||
from (select distinct TailCollectionType, TailCollectionId, TailMediaItemId, TailMultiCollectionId, TailSmartCollectionId from ProgramScheduleDurationItem)");
|
||||
|
||||
migrationBuilder.Sql(
|
||||
@"
|
||||
update ProgramScheduleItem
|
||||
set TailFillerId = FPID
|
||||
from (select fp.Id as FPID, psdi.Id as PSDIID from FillerPreset fp inner join ProgramScheduleDurationItem psdi where TailCollectionType = CollectionType and TailCollectionId is CollectionId and TailMediaItemId is MediaItemId and TailMultiCollectionId is MultiCollectionId and TailSmartCollectionId is SmartCollectionId) as whatever
|
||||
where PSDIID = ProgramScheduleItem.Id");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
+3645
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,148 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Remove_DurationTailFiller : Migration
|
||||
{
|
||||
protected override void Up(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");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
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.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
+3648
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_PlayoutItemIsFallback : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsFallback",
|
||||
table: "PlayoutItem",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsFallback",
|
||||
table: "PlayoutItem");
|
||||
}
|
||||
}
|
||||
}
|
||||
+3651
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_PlayoutItemFillerKind : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "FillerKind",
|
||||
table: "PlayoutItem",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FillerKind",
|
||||
table: "PlayoutItem");
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+3651
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Update_PlayoutItemFillerKind : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql(@"UPDATE PlayoutItem SET FillerKind = 4 WHERE IsFiller = 1");
|
||||
migrationBuilder.Sql(@"UPDATE PlayoutItem SET FillerKind = 5 WHERE IsFallback = 1");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+3645
File diff suppressed because it is too large
Load Diff
+35
@@ -0,0 +1,35 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Remove_PlayoutItemIsFillerIsFallback : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsFallback",
|
||||
table: "PlayoutItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsFiller",
|
||||
table: "PlayoutItem");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsFallback",
|
||||
table: "PlayoutItem",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsFiller",
|
||||
table: "PlayoutItem",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
+3648
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Add_PlayoutItemGuideGroup : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CustomGroup",
|
||||
table: "PlayoutItem",
|
||||
newName: "GuideGroup");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Anchor_NextGuideGroup",
|
||||
table: "Playout",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Anchor_NextGuideGroup",
|
||||
table: "Playout");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "GuideGroup",
|
||||
table: "PlayoutItem",
|
||||
newName: "CustomGroup");
|
||||
}
|
||||
}
|
||||
}
|
||||
+3648
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Rebuild_AllPlayouts20201020 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql(@"DELETE FROM PlayoutItem");
|
||||
migrationBuilder.Sql(@"DELETE FROM PlayoutProgramScheduleAnchor");
|
||||
migrationBuilder.Sql(@"UPDATE Playout SET Anchor_NextStart = null, Anchor_NextScheduleItemId = null");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+3654
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Add_PlayoutItemInPointOutPoint : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<TimeSpan>(
|
||||
name: "InPoint",
|
||||
table: "PlayoutItem",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new TimeSpan(0, 0, 0, 0, 0));
|
||||
|
||||
migrationBuilder.AddColumn<TimeSpan>(
|
||||
name: "OutPoint",
|
||||
table: "PlayoutItem",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new TimeSpan(0, 0, 0, 0, 0));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InPoint",
|
||||
table: "PlayoutItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OutPoint",
|
||||
table: "PlayoutItem");
|
||||
}
|
||||
}
|
||||
}
|
||||
+3657
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class Add_PlayoutItemChapterTitle : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ChapterTitle",
|
||||
table: "PlayoutItem",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ChapterTitle",
|
||||
table: "PlayoutItem");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -514,6 +514,58 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
b.ToTable("FFmpegProfile");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.Filler.FillerPreset", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("CollectionId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("CollectionType")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("Count")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<TimeSpan?>("Duration")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("FillerKind")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("FillerMode")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("MediaItemId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("MultiCollectionId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("PadToNearestMinute")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("SmartCollectionId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CollectionId");
|
||||
|
||||
b.HasIndex("MediaItemId");
|
||||
|
||||
b.HasIndex("MultiCollectionId");
|
||||
|
||||
b.HasIndex("SmartCollectionId");
|
||||
|
||||
b.ToTable("FillerPreset");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.Genre", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -699,6 +751,34 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
b.ToTable("LibraryPath");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaChapter", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ChapterId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<TimeSpan>("EndTime")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("MediaVersionId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<TimeSpan>("StartTime")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MediaVersionId");
|
||||
|
||||
b.ToTable("MediaChapter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaFile", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1153,24 +1233,33 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("CustomGroup")
|
||||
.HasColumnType("INTEGER");
|
||||
b.Property<string>("ChapterTitle")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("CustomTitle")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("FillerKind")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Finish")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime?>("GuideFinish")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("IsFiller")
|
||||
b.Property<int>("GuideGroup")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<TimeSpan>("InPoint")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("MediaItemId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<TimeSpan>("OutPoint")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("PlayoutId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
@@ -1312,6 +1401,9 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
b.Property<string>("CustomTitle")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("FallbackFillerId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GuideMode")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
@@ -1321,12 +1413,21 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
b.Property<int?>("MediaItemId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("MidRollFillerId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("MultiCollectionId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("PlaybackOrder")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("PostRollFillerId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("PreRollFillerId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("ProgramScheduleId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
@@ -1336,18 +1437,31 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
b.Property<TimeSpan?>("StartTime")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("TailFillerId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CollectionId");
|
||||
|
||||
b.HasIndex("FallbackFillerId");
|
||||
|
||||
b.HasIndex("MediaItemId");
|
||||
|
||||
b.HasIndex("MidRollFillerId");
|
||||
|
||||
b.HasIndex("MultiCollectionId");
|
||||
|
||||
b.HasIndex("PostRollFillerId");
|
||||
|
||||
b.HasIndex("PreRollFillerId");
|
||||
|
||||
b.HasIndex("ProgramScheduleId");
|
||||
|
||||
b.HasIndex("SmartCollectionId");
|
||||
|
||||
b.HasIndex("TailFillerId");
|
||||
|
||||
b.ToTable("ProgramScheduleItem");
|
||||
});
|
||||
|
||||
@@ -1902,32 +2016,9 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
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");
|
||||
});
|
||||
|
||||
@@ -2287,6 +2378,37 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
b.Navigation("Resolution");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.Filler.FillerPreset", b =>
|
||||
{
|
||||
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
|
||||
.WithMany()
|
||||
.HasForeignKey("CollectionId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.MediaItem", "MediaItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("MediaItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.MultiCollection", "MultiCollection")
|
||||
.WithMany()
|
||||
.HasForeignKey("MultiCollectionId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.SmartCollection", "SmartCollection")
|
||||
.WithMany()
|
||||
.HasForeignKey("SmartCollectionId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.Navigation("Collection");
|
||||
|
||||
b.Navigation("MediaItem");
|
||||
|
||||
b.Navigation("MultiCollection");
|
||||
|
||||
b.Navigation("SmartCollection");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.Genre", b =>
|
||||
{
|
||||
b.HasOne("ErsatzTV.Core.Domain.ArtistMetadata", null)
|
||||
@@ -2377,6 +2499,17 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
b.Navigation("Library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaChapter", b =>
|
||||
{
|
||||
b.HasOne("ErsatzTV.Core.Domain.MediaVersion", "MediaVersion")
|
||||
.WithMany("Chapters")
|
||||
.HasForeignKey("MediaVersionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("MediaVersion");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaFile", b =>
|
||||
{
|
||||
b.HasOne("ErsatzTV.Core.Domain.MediaVersion", "MediaVersion")
|
||||
@@ -2578,6 +2711,9 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
b1.Property<int?>("MultipleRemaining")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b1.Property<int>("NextGuideGroup")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b1.Property<int>("NextScheduleItemId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
@@ -2724,16 +2860,36 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
.HasForeignKey("CollectionId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.Filler.FillerPreset", "FallbackFiller")
|
||||
.WithMany()
|
||||
.HasForeignKey("FallbackFillerId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.MediaItem", "MediaItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("MediaItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.Filler.FillerPreset", "MidRollFiller")
|
||||
.WithMany()
|
||||
.HasForeignKey("MidRollFillerId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.MultiCollection", "MultiCollection")
|
||||
.WithMany()
|
||||
.HasForeignKey("MultiCollectionId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.Filler.FillerPreset", "PostRollFiller")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostRollFillerId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.Filler.FillerPreset", "PreRollFiller")
|
||||
.WithMany()
|
||||
.HasForeignKey("PreRollFillerId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.ProgramSchedule", "ProgramSchedule")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("ProgramScheduleId")
|
||||
@@ -2742,17 +2898,33 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.SmartCollection", "SmartCollection")
|
||||
.WithMany()
|
||||
.HasForeignKey("SmartCollectionId");
|
||||
.HasForeignKey("SmartCollectionId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("ErsatzTV.Core.Domain.Filler.FillerPreset", "TailFiller")
|
||||
.WithMany()
|
||||
.HasForeignKey("TailFillerId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.Navigation("Collection");
|
||||
|
||||
b.Navigation("FallbackFiller");
|
||||
|
||||
b.Navigation("MediaItem");
|
||||
|
||||
b.Navigation("MidRollFiller");
|
||||
|
||||
b.Navigation("MultiCollection");
|
||||
|
||||
b.Navigation("PostRollFiller");
|
||||
|
||||
b.Navigation("PreRollFiller");
|
||||
|
||||
b.Navigation("ProgramSchedule");
|
||||
|
||||
b.Navigation("SmartCollection");
|
||||
|
||||
b.Navigation("TailFiller");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
|
||||
@@ -3071,33 +3243,6 @@ 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 =>
|
||||
@@ -3313,6 +3458,8 @@ namespace ErsatzTV.Infrastructure.Migrations
|
||||
|
||||
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
|
||||
{
|
||||
b.Navigation("Chapters");
|
||||
|
||||
b.Navigation("MediaFiles");
|
||||
|
||||
b.Navigation("Streams");
|
||||
|
||||
Reference in New Issue
Block a user