mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* add dead air fallback to deco editor * fix deco watermark logic * use dead air fallback from decospull/1676/head
19 changed files with 17474 additions and 86 deletions
@ -1,5 +1,19 @@
@@ -1,5 +1,19 @@
|
||||
using ErsatzTV.Core; |
||||
using ErsatzTV.Core.Domain; |
||||
using ErsatzTV.Core.Domain.Scheduling; |
||||
|
||||
namespace ErsatzTV.Application.Scheduling; |
||||
|
||||
public record UpdateDeco(int DecoId, int DecoGroupId, string Name, int? WatermarkId) : IRequest<Either<BaseError, DecoViewModel>>; |
||||
public record UpdateDeco( |
||||
int DecoId, |
||||
int DecoGroupId, |
||||
string Name, |
||||
DecoMode WatermarkMode, |
||||
int? WatermarkId, |
||||
DecoMode DeadAirFallbackMode, |
||||
ProgramScheduleItemCollectionType DeadAirFallbackCollectionType, |
||||
int? DeadAirFallbackCollectionId, |
||||
int? DeadAirFallbackMediaItemId, |
||||
int? DeadAirFallbackMultiCollectionId, |
||||
int? DeadAirFallbackSmartCollectionId) |
||||
: IRequest<Either<BaseError, DecoViewModel>>; |
||||
|
@ -1,3 +1,17 @@
@@ -1,3 +1,17 @@
|
||||
using ErsatzTV.Core.Domain; |
||||
using ErsatzTV.Core.Domain.Scheduling; |
||||
|
||||
namespace ErsatzTV.Application.Scheduling; |
||||
|
||||
public record DecoViewModel(int Id, int DecoGroupId, string Name, int? WatermarkId); |
||||
public record DecoViewModel( |
||||
int Id, |
||||
int DecoGroupId, |
||||
string Name, |
||||
DecoMode WatermarkMode, |
||||
int? WatermarkId, |
||||
DecoMode DeadAirFallbackMode, |
||||
ProgramScheduleItemCollectionType DeadAirFallbackCollectionType, |
||||
int? DeadAirFallbackCollectionId, |
||||
int? DeadAirFallbackMediaItemId, |
||||
int? DeadAirFallbackMultiCollectionId, |
||||
int? DeadAirFallbackSmartCollectionId); |
||||
|
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
namespace ErsatzTV.Core.Domain.Scheduling; |
||||
|
||||
public enum DecoMode |
||||
{ |
||||
Inherit = 0, |
||||
Disable = 1, |
||||
Override = 2 |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,175 @@
@@ -0,0 +1,175 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_DecoMode : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackCollectionId", |
||||
table: "Deco", |
||||
type: "int", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackCollectionType", |
||||
table: "Deco", |
||||
type: "int", |
||||
nullable: false, |
||||
defaultValue: 0); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackMediaItemId", |
||||
table: "Deco", |
||||
type: "int", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackMode", |
||||
table: "Deco", |
||||
type: "int", |
||||
nullable: false, |
||||
defaultValue: 0); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackMultiCollectionId", |
||||
table: "Deco", |
||||
type: "int", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackSmartCollectionId", |
||||
table: "Deco", |
||||
type: "int", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "WatermarkMode", |
||||
table: "Deco", |
||||
type: "int", |
||||
nullable: false, |
||||
defaultValue: 0); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_Deco_DeadAirFallbackCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackCollectionId"); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_Deco_DeadAirFallbackMediaItemId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackMediaItemId"); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_Deco_DeadAirFallbackMultiCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackMultiCollectionId"); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_Deco_DeadAirFallbackSmartCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackSmartCollectionId"); |
||||
|
||||
migrationBuilder.AddForeignKey( |
||||
name: "FK_Deco_Collection_DeadAirFallbackCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackCollectionId", |
||||
principalTable: "Collection", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
|
||||
migrationBuilder.AddForeignKey( |
||||
name: "FK_Deco_MediaItem_DeadAirFallbackMediaItemId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackMediaItemId", |
||||
principalTable: "MediaItem", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
|
||||
migrationBuilder.AddForeignKey( |
||||
name: "FK_Deco_MultiCollection_DeadAirFallbackMultiCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackMultiCollectionId", |
||||
principalTable: "MultiCollection", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
|
||||
migrationBuilder.AddForeignKey( |
||||
name: "FK_Deco_SmartCollection_DeadAirFallbackSmartCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackSmartCollectionId", |
||||
principalTable: "SmartCollection", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropForeignKey( |
||||
name: "FK_Deco_Collection_DeadAirFallbackCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropForeignKey( |
||||
name: "FK_Deco_MediaItem_DeadAirFallbackMediaItemId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropForeignKey( |
||||
name: "FK_Deco_MultiCollection_DeadAirFallbackMultiCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropForeignKey( |
||||
name: "FK_Deco_SmartCollection_DeadAirFallbackSmartCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropIndex( |
||||
name: "IX_Deco_DeadAirFallbackCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropIndex( |
||||
name: "IX_Deco_DeadAirFallbackMediaItemId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropIndex( |
||||
name: "IX_Deco_DeadAirFallbackMultiCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropIndex( |
||||
name: "IX_Deco_DeadAirFallbackSmartCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackCollectionType", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackMediaItemId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackMode", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackMultiCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackSmartCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "WatermarkMode", |
||||
table: "Deco"); |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,153 @@
@@ -0,0 +1,153 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_Deco_DeadAirFallback : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackCollectionId", |
||||
table: "Deco", |
||||
type: "INTEGER", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackCollectionType", |
||||
table: "Deco", |
||||
type: "INTEGER", |
||||
nullable: false, |
||||
defaultValue: 0); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackMediaItemId", |
||||
table: "Deco", |
||||
type: "INTEGER", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackMultiCollectionId", |
||||
table: "Deco", |
||||
type: "INTEGER", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackSmartCollectionId", |
||||
table: "Deco", |
||||
type: "INTEGER", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_Deco_DeadAirFallbackCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackCollectionId"); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_Deco_DeadAirFallbackMediaItemId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackMediaItemId"); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_Deco_DeadAirFallbackMultiCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackMultiCollectionId"); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_Deco_DeadAirFallbackSmartCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackSmartCollectionId"); |
||||
|
||||
migrationBuilder.AddForeignKey( |
||||
name: "FK_Deco_Collection_DeadAirFallbackCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackCollectionId", |
||||
principalTable: "Collection", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
|
||||
migrationBuilder.AddForeignKey( |
||||
name: "FK_Deco_MediaItem_DeadAirFallbackMediaItemId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackMediaItemId", |
||||
principalTable: "MediaItem", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
|
||||
migrationBuilder.AddForeignKey( |
||||
name: "FK_Deco_MultiCollection_DeadAirFallbackMultiCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackMultiCollectionId", |
||||
principalTable: "MultiCollection", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
|
||||
migrationBuilder.AddForeignKey( |
||||
name: "FK_Deco_SmartCollection_DeadAirFallbackSmartCollectionId", |
||||
table: "Deco", |
||||
column: "DeadAirFallbackSmartCollectionId", |
||||
principalTable: "SmartCollection", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropForeignKey( |
||||
name: "FK_Deco_Collection_DeadAirFallbackCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropForeignKey( |
||||
name: "FK_Deco_MediaItem_DeadAirFallbackMediaItemId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropForeignKey( |
||||
name: "FK_Deco_MultiCollection_DeadAirFallbackMultiCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropForeignKey( |
||||
name: "FK_Deco_SmartCollection_DeadAirFallbackSmartCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropIndex( |
||||
name: "IX_Deco_DeadAirFallbackCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropIndex( |
||||
name: "IX_Deco_DeadAirFallbackMediaItemId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropIndex( |
||||
name: "IX_Deco_DeadAirFallbackMultiCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropIndex( |
||||
name: "IX_Deco_DeadAirFallbackSmartCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackCollectionType", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackMediaItemId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackMultiCollectionId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackSmartCollectionId", |
||||
table: "Deco"); |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_DecoMode : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<int>( |
||||
name: "DeadAirFallbackMode", |
||||
table: "Deco", |
||||
type: "INTEGER", |
||||
nullable: false, |
||||
defaultValue: 0); |
||||
|
||||
migrationBuilder.AddColumn<int>( |
||||
name: "WatermarkMode", |
||||
table: "Deco", |
||||
type: "INTEGER", |
||||
nullable: false, |
||||
defaultValue: 0); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "DeadAirFallbackMode", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "WatermarkMode", |
||||
table: "Deco"); |
||||
} |
||||
} |
||||
} |
@ -1,8 +1,20 @@
@@ -1,8 +1,20 @@
|
||||
using ErsatzTV.Application.MediaCollections; |
||||
using ErsatzTV.Application.MediaItems; |
||||
using ErsatzTV.Core.Domain; |
||||
using ErsatzTV.Core.Domain.Scheduling; |
||||
|
||||
namespace ErsatzTV.ViewModels; |
||||
|
||||
public class DecoEditViewModel |
||||
{ |
||||
public int DecoGroupId { get; set; } |
||||
public string Name { get; set; } |
||||
public DecoMode WatermarkMode { get; set; } |
||||
public int? WatermarkId { get; set; } |
||||
public DecoMode DeadAirFallbackMode { get; set; } |
||||
public ProgramScheduleItemCollectionType DeadAirFallbackCollectionType { get; set; } |
||||
public MediaCollectionViewModel DeadAirFallbackCollection { get; set; } |
||||
public MultiCollectionViewModel DeadAirFallbackMultiCollection { get; set; } |
||||
public SmartCollectionViewModel DeadAirFallbackSmartCollection { get; set; } |
||||
public NamedMediaItemViewModel DeadAirFallbackMediaItem { get; set; } |
||||
} |
||||
|
Loading…
Reference in new issue