mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* 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 dependenciespull/429/head
41 changed files with 14170 additions and 98 deletions
@ -0,0 +1,7 @@ |
|||||||
|
using System.Collections.Generic; |
||||||
|
using MediatR; |
||||||
|
|
||||||
|
namespace ErsatzTV.Application.Playouts.Queries |
||||||
|
{ |
||||||
|
public record GetFuturePlayoutItemsById(int PlayoutId, int PageNum, int PageSize) : IRequest<PagedPlayoutItemsViewModel>; |
||||||
|
} |
@ -1,7 +0,0 @@ |
|||||||
using System.Collections.Generic; |
|
||||||
using MediatR; |
|
||||||
|
|
||||||
namespace ErsatzTV.Application.Playouts.Queries |
|
||||||
{ |
|
||||||
public record GetPlayoutItemsById(int PlayoutId, int PageNum, int PageSize) : IRequest<PagedPlayoutItemsViewModel>; |
|
||||||
} |
|
@ -0,0 +1,10 @@ |
|||||||
|
namespace ErsatzTV.Core.Domain |
||||||
|
{ |
||||||
|
public enum TailMode |
||||||
|
{ |
||||||
|
None = 0, |
||||||
|
Offline = 1, |
||||||
|
Slate = 2, |
||||||
|
Filler = 3 |
||||||
|
} |
||||||
|
} |
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"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
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_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"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
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"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
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"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue