mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* add multiple watermarks per playout item * fixes * update yaml playout watermark to support multiple watermarks * use graphics engine for intermittent watermarkspull/2269/head
41 changed files with 37436 additions and 206 deletions
@ -0,0 +1,9 @@ |
|||||||
|
namespace ErsatzTV.Core.Domain; |
||||||
|
|
||||||
|
public class PlayoutItemWatermark |
||||||
|
{ |
||||||
|
public int PlayoutItemId { get; set; } |
||||||
|
public PlayoutItem PlayoutItem { get; set; } |
||||||
|
public ChannelWatermark Watermark { get; set; } |
||||||
|
public int? WatermarkId { get; set; } |
||||||
|
} |
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,51 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_PlayoutItemWatermark : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.CreateTable( |
||||||
|
name: "PlayoutItemWatermark", |
||||||
|
columns: table => new |
||||||
|
{ |
||||||
|
PlayoutItemId = table.Column<int>(type: "int", nullable: false), |
||||||
|
WatermarkId = table.Column<int>(type: "int", nullable: false) |
||||||
|
}, |
||||||
|
constraints: table => |
||||||
|
{ |
||||||
|
table.PrimaryKey("PK_PlayoutItemWatermark", x => new { x.PlayoutItemId, x.WatermarkId }); |
||||||
|
table.ForeignKey( |
||||||
|
name: "FK_PlayoutItemWatermark_ChannelWatermark_WatermarkId", |
||||||
|
column: x => x.WatermarkId, |
||||||
|
principalTable: "ChannelWatermark", |
||||||
|
principalColumn: "Id", |
||||||
|
onDelete: ReferentialAction.Cascade); |
||||||
|
table.ForeignKey( |
||||||
|
name: "FK_PlayoutItemWatermark_PlayoutItem_PlayoutItemId", |
||||||
|
column: x => x.PlayoutItemId, |
||||||
|
principalTable: "PlayoutItem", |
||||||
|
principalColumn: "Id", |
||||||
|
onDelete: ReferentialAction.Cascade); |
||||||
|
}) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_PlayoutItemWatermark_WatermarkId", |
||||||
|
table: "PlayoutItemWatermark", |
||||||
|
column: "WatermarkId"); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropTable( |
||||||
|
name: "PlayoutItemWatermark"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,23 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Populate_PlayoutItemWatermark : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.Sql( |
||||||
|
@"INSERT INTO `PlayoutItemWatermark` (`PlayoutItemId`, `WatermarkId`)
|
||||||
|
SELECT `Id`, `WatermarkId` FROM `PlayoutItem` WHERE `WatermarkId` IS NOT NULL");
|
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,49 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Remove_PlayoutItemWatermark : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropForeignKey( |
||||||
|
name: "FK_PlayoutItem_ChannelWatermark_WatermarkId", |
||||||
|
table: "PlayoutItem"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_PlayoutItem_WatermarkId", |
||||||
|
table: "PlayoutItem"); |
||||||
|
|
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "WatermarkId", |
||||||
|
table: "PlayoutItem"); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<int>( |
||||||
|
name: "WatermarkId", |
||||||
|
table: "PlayoutItem", |
||||||
|
type: "int", |
||||||
|
nullable: true); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_PlayoutItem_WatermarkId", |
||||||
|
table: "PlayoutItem", |
||||||
|
column: "WatermarkId"); |
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey( |
||||||
|
name: "FK_PlayoutItem_ChannelWatermark_WatermarkId", |
||||||
|
table: "PlayoutItem", |
||||||
|
column: "WatermarkId", |
||||||
|
principalTable: "ChannelWatermark", |
||||||
|
principalColumn: "Id", |
||||||
|
onDelete: ReferentialAction.SetNull); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,50 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_PlayoutItemWatermarkTable : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.CreateTable( |
||||||
|
name: "PlayoutItemWatermark", |
||||||
|
columns: table => new |
||||||
|
{ |
||||||
|
PlayoutItemId = table.Column<int>(type: "INTEGER", nullable: false), |
||||||
|
WatermarkId = table.Column<int>(type: "INTEGER", nullable: false) |
||||||
|
}, |
||||||
|
constraints: table => |
||||||
|
{ |
||||||
|
table.PrimaryKey("PK_PlayoutItemWatermark", x => new { x.PlayoutItemId, x.WatermarkId }); |
||||||
|
table.ForeignKey( |
||||||
|
name: "FK_PlayoutItemWatermark_ChannelWatermark_WatermarkId", |
||||||
|
column: x => x.WatermarkId, |
||||||
|
principalTable: "ChannelWatermark", |
||||||
|
principalColumn: "Id", |
||||||
|
onDelete: ReferentialAction.Cascade); |
||||||
|
table.ForeignKey( |
||||||
|
name: "FK_PlayoutItemWatermark_PlayoutItem_PlayoutItemId", |
||||||
|
column: x => x.PlayoutItemId, |
||||||
|
principalTable: "PlayoutItem", |
||||||
|
principalColumn: "Id", |
||||||
|
onDelete: ReferentialAction.Cascade); |
||||||
|
}); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_PlayoutItemWatermark_WatermarkId", |
||||||
|
table: "PlayoutItemWatermark", |
||||||
|
column: "WatermarkId"); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropTable( |
||||||
|
name: "PlayoutItemWatermark"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,23 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Populate_PlayoutItemWatermark : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.Sql( |
||||||
|
@"INSERT INTO `PlayoutItemWatermark` (`PlayoutItemId`, `WatermarkId`)
|
||||||
|
SELECT `Id`, `WatermarkId` FROM `PlayoutItem` WHERE `WatermarkId` IS NOT NULL");
|
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,49 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Remove_PlayoutItemWatermark : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropForeignKey( |
||||||
|
name: "FK_PlayoutItem_ChannelWatermark_WatermarkId", |
||||||
|
table: "PlayoutItem"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_PlayoutItem_WatermarkId", |
||||||
|
table: "PlayoutItem"); |
||||||
|
|
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "WatermarkId", |
||||||
|
table: "PlayoutItem"); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<int>( |
||||||
|
name: "WatermarkId", |
||||||
|
table: "PlayoutItem", |
||||||
|
type: "INTEGER", |
||||||
|
nullable: true); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_PlayoutItem_WatermarkId", |
||||||
|
table: "PlayoutItem", |
||||||
|
column: "WatermarkId"); |
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey( |
||||||
|
name: "FK_PlayoutItem_ChannelWatermark_WatermarkId", |
||||||
|
table: "PlayoutItem", |
||||||
|
column: "WatermarkId", |
||||||
|
principalTable: "ChannelWatermark", |
||||||
|
principalColumn: "Id", |
||||||
|
onDelete: ReferentialAction.SetNull); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue