Browse Source

starting to add break content ui

add-deco-break-content
Jason Dove 1 year ago
parent
commit
bc44069cc0
No known key found for this signature in database
  1. 5954
      ErsatzTV.Infrastructure.MySql/Migrations/20240802133727_Add_DecoBreakContent.Designer.cs
  2. 108
      ErsatzTV.Infrastructure.MySql/Migrations/20240802133727_Add_DecoBreakContent.cs
  3. 88
      ErsatzTV.Infrastructure.MySql/Migrations/TvContextModelSnapshot.cs
  4. 5791
      ErsatzTV.Infrastructure.Sqlite/Migrations/20240802130819_Add_DecoBreakContent.Designer.cs
  5. 106
      ErsatzTV.Infrastructure.Sqlite/Migrations/20240802130819_Add_DecoBreakContent.cs
  6. 86
      ErsatzTV.Infrastructure.Sqlite/Migrations/TvContextModelSnapshot.cs
  7. 114
      ErsatzTV/Pages/DecoEditor.razor

5954
ErsatzTV.Infrastructure.MySql/Migrations/20240802133727_Add_DecoBreakContent.Designer.cs generated

File diff suppressed because it is too large Load Diff

108
ErsatzTV.Infrastructure.MySql/Migrations/20240802133727_Add_DecoBreakContent.cs

@ -0,0 +1,108 @@ @@ -0,0 +1,108 @@
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.MySql.Migrations
{
/// <inheritdoc />
public partial class Add_DecoBreakContent : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "BreakContentMode",
table: "Deco",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "DecoBreakContent",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
DecoId = table.Column<int>(type: "int", nullable: false),
CollectionType = table.Column<int>(type: "int", nullable: false),
CollectionId = table.Column<int>(type: "int", nullable: true),
MediaItemId = table.Column<int>(type: "int", nullable: true),
MultiCollectionId = table.Column<int>(type: "int", nullable: true),
SmartCollectionId = table.Column<int>(type: "int", nullable: true),
Placement = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DecoBreakContent", x => x.Id);
table.ForeignKey(
name: "FK_DecoBreakContent_Collection_CollectionId",
column: x => x.CollectionId,
principalTable: "Collection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_DecoBreakContent_Deco_DecoId",
column: x => x.DecoId,
principalTable: "Deco",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_DecoBreakContent_MediaItem_MediaItemId",
column: x => x.MediaItemId,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_DecoBreakContent_MultiCollection_MultiCollectionId",
column: x => x.MultiCollectionId,
principalTable: "MultiCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_DecoBreakContent_SmartCollection_SmartCollectionId",
column: x => x.SmartCollectionId,
principalTable: "SmartCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_DecoBreakContent_CollectionId",
table: "DecoBreakContent",
column: "CollectionId");
migrationBuilder.CreateIndex(
name: "IX_DecoBreakContent_DecoId",
table: "DecoBreakContent",
column: "DecoId");
migrationBuilder.CreateIndex(
name: "IX_DecoBreakContent_MediaItemId",
table: "DecoBreakContent",
column: "MediaItemId");
migrationBuilder.CreateIndex(
name: "IX_DecoBreakContent_MultiCollectionId",
table: "DecoBreakContent",
column: "MultiCollectionId");
migrationBuilder.CreateIndex(
name: "IX_DecoBreakContent_SmartCollectionId",
table: "DecoBreakContent",
column: "SmartCollectionId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DecoBreakContent");
migrationBuilder.DropColumn(
name: "BreakContentMode",
table: "Deco");
}
}
}

88
ErsatzTV.Infrastructure.MySql/Migrations/TvContextModelSnapshot.cs

@ -2267,6 +2267,9 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations @@ -2267,6 +2267,9 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<int>("BreakContentMode")
.HasColumnType("int");
b.Property<int?>("DeadAirFallbackCollectionId")
.HasColumnType("int");
@ -2344,6 +2347,50 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations @@ -2344,6 +2347,50 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
b.ToTable("Deco", (string)null);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Scheduling.DecoBreakContent", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<int?>("CollectionId")
.HasColumnType("int");
b.Property<int>("CollectionType")
.HasColumnType("int");
b.Property<int>("DecoId")
.HasColumnType("int");
b.Property<int?>("MediaItemId")
.HasColumnType("int");
b.Property<int?>("MultiCollectionId")
.HasColumnType("int");
b.Property<int>("Placement")
.HasColumnType("int");
b.Property<int?>("SmartCollectionId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CollectionId");
b.HasIndex("DecoId");
b.HasIndex("MediaItemId");
b.HasIndex("MultiCollectionId");
b.HasIndex("SmartCollectionId");
b.ToTable("DecoBreakContent", (string)null);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Scheduling.DecoGroup", b =>
{
b.Property<int>("Id")
@ -4740,6 +4787,45 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations @@ -4740,6 +4787,45 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
b.Navigation("Watermark");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Scheduling.DecoBreakContent", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany()
.HasForeignKey("CollectionId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.Scheduling.Deco", "Deco")
.WithMany("BreakContent")
.HasForeignKey("DecoId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
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("Deco");
b.Navigation("MediaItem");
b.Navigation("MultiCollection");
b.Navigation("SmartCollection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Scheduling.DecoTemplate", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Scheduling.DecoTemplateGroup", "DecoTemplateGroup")
@ -5666,6 +5752,8 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations @@ -5666,6 +5752,8 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
modelBuilder.Entity("ErsatzTV.Core.Domain.Scheduling.Deco", b =>
{
b.Navigation("BreakContent");
b.Navigation("Playouts");
});

5791
ErsatzTV.Infrastructure.Sqlite/Migrations/20240802130819_Add_DecoBreakContent.Designer.cs generated

File diff suppressed because it is too large Load Diff

106
ErsatzTV.Infrastructure.Sqlite/Migrations/20240802130819_Add_DecoBreakContent.cs

@ -0,0 +1,106 @@ @@ -0,0 +1,106 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
{
/// <inheritdoc />
public partial class Add_DecoBreakContent : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "BreakContentMode",
table: "Deco",
type: "INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "DecoBreakContent",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
DecoId = table.Column<int>(type: "INTEGER", nullable: false),
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),
Placement = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DecoBreakContent", x => x.Id);
table.ForeignKey(
name: "FK_DecoBreakContent_Collection_CollectionId",
column: x => x.CollectionId,
principalTable: "Collection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_DecoBreakContent_Deco_DecoId",
column: x => x.DecoId,
principalTable: "Deco",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_DecoBreakContent_MediaItem_MediaItemId",
column: x => x.MediaItemId,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_DecoBreakContent_MultiCollection_MultiCollectionId",
column: x => x.MultiCollectionId,
principalTable: "MultiCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_DecoBreakContent_SmartCollection_SmartCollectionId",
column: x => x.SmartCollectionId,
principalTable: "SmartCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_DecoBreakContent_CollectionId",
table: "DecoBreakContent",
column: "CollectionId");
migrationBuilder.CreateIndex(
name: "IX_DecoBreakContent_DecoId",
table: "DecoBreakContent",
column: "DecoId");
migrationBuilder.CreateIndex(
name: "IX_DecoBreakContent_MediaItemId",
table: "DecoBreakContent",
column: "MediaItemId");
migrationBuilder.CreateIndex(
name: "IX_DecoBreakContent_MultiCollectionId",
table: "DecoBreakContent",
column: "MultiCollectionId");
migrationBuilder.CreateIndex(
name: "IX_DecoBreakContent_SmartCollectionId",
table: "DecoBreakContent",
column: "SmartCollectionId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DecoBreakContent");
migrationBuilder.DropColumn(
name: "BreakContentMode",
table: "Deco");
}
}
}

86
ErsatzTV.Infrastructure.Sqlite/Migrations/TvContextModelSnapshot.cs

@ -2152,6 +2152,9 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations @@ -2152,6 +2152,9 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("BreakContentMode")
.HasColumnType("INTEGER");
b.Property<int?>("DeadAirFallbackCollectionId")
.HasColumnType("INTEGER");
@ -2229,6 +2232,48 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations @@ -2229,6 +2232,48 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations
b.ToTable("Deco", (string)null);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Scheduling.DecoBreakContent", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int?>("CollectionId")
.HasColumnType("INTEGER");
b.Property<int>("CollectionType")
.HasColumnType("INTEGER");
b.Property<int>("DecoId")
.HasColumnType("INTEGER");
b.Property<int?>("MediaItemId")
.HasColumnType("INTEGER");
b.Property<int?>("MultiCollectionId")
.HasColumnType("INTEGER");
b.Property<int>("Placement")
.HasColumnType("INTEGER");
b.Property<int?>("SmartCollectionId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("CollectionId");
b.HasIndex("DecoId");
b.HasIndex("MediaItemId");
b.HasIndex("MultiCollectionId");
b.HasIndex("SmartCollectionId");
b.ToTable("DecoBreakContent", (string)null);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Scheduling.DecoGroup", b =>
{
b.Property<int>("Id")
@ -4579,6 +4624,45 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations @@ -4579,6 +4624,45 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations
b.Navigation("Watermark");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Scheduling.DecoBreakContent", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany()
.HasForeignKey("CollectionId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.Scheduling.Deco", "Deco")
.WithMany("BreakContent")
.HasForeignKey("DecoId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
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("Deco");
b.Navigation("MediaItem");
b.Navigation("MultiCollection");
b.Navigation("SmartCollection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Scheduling.DecoTemplate", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Scheduling.DecoTemplateGroup", "DecoTemplateGroup")
@ -5505,6 +5589,8 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations @@ -5505,6 +5589,8 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations
modelBuilder.Entity("ErsatzTV.Core.Domain.Scheduling.Deco", b =>
{
b.Navigation("BreakContent");
b.Navigation("Playouts");
});

114
ErsatzTV/Pages/DecoEditor.razor

@ -12,9 +12,9 @@ @@ -12,9 +12,9 @@
@inject ISnackbar Snackbar
@inject IMediator Mediator
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8" Style="display: flex; flex-direction: row">
<MudStack Class="mr-6">
<MudText Typo="Typo.h4" Class="mb-4">Edit Deco</MudText>
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudText Typo="Typo.h4" Class="mb-4">Edit Deco</MudText>
<MudStack Class="mt-4" Wrap="Wrap.Wrap" Row="true" Spacing="6">
<MudCard Class="mb-6" Style="width: 350px">
<MudCardContent>
<MudTextField Label="Name" @bind-Value="_deco.Name" For="@(() => _deco.Name)"/>
@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
</MudButton>
</MudCardActions>
</MudCard>
<MudFlexBreak />
<MudCard Class="mb-6" Style="width: 350px">
<MudCardHeader>
<CardHeaderContent>
@ -277,6 +278,7 @@ @@ -277,6 +278,7 @@
}
</MudCardContent>
</MudCard>
<MudFlexBreak />
<MudCard class="mb-6" Style="width: 350px">
<MudCardHeader>
<CardHeaderContent>
@ -296,6 +298,95 @@ @@ -296,6 +298,95 @@
<MudSelectItem Value="DecoMode.Disable">Disable</MudSelectItem>
<MudSelectItem Value="DecoMode.Override">Override</MudSelectItem>
</MudSelect>
<MudSelect Disabled="@(_deco.BreakContentMode != DecoMode.Override)"
Label="Break Content Collection Type"
@bind-Value="_selectedBreakContent.CollectionType"
For="@(() => _selectedBreakContent.CollectionType)">
<MudSelectItem Value="ProgramScheduleItemCollectionType.Collection">Collection</MudSelectItem>
<MudSelectItem Value="ProgramScheduleItemCollectionType.TelevisionShow">Television Show</MudSelectItem>
<MudSelectItem Value="ProgramScheduleItemCollectionType.TelevisionSeason">Television Season</MudSelectItem>
<MudSelectItem Value="ProgramScheduleItemCollectionType.Artist">Artist</MudSelectItem>
<MudSelectItem Value="ProgramScheduleItemCollectionType.MultiCollection">Multi Collection</MudSelectItem>
<MudSelectItem Value="ProgramScheduleItemCollectionType.SmartCollection">Smart Collection</MudSelectItem>
</MudSelect>
@if (_selectedBreakContent.CollectionType == ProgramScheduleItemCollectionType.Collection)
{
<MudSelect Class="mt-3"
T="MediaCollectionViewModel"
Disabled="@(_deco.BreakContentMode != DecoMode.Override)"
Label="Collection"
@bind-value="_selectedBreakContent.Collection">
@foreach (MediaCollectionViewModel collection in _mediaCollections)
{
<MudSelectItem Value="@collection">@collection.Name</MudSelectItem>
}
</MudSelect>
}
@if (_selectedBreakContent.CollectionType == ProgramScheduleItemCollectionType.MultiCollection)
{
<MudSelect Class="mt-3"
T="MultiCollectionViewModel"
Disabled="@(_deco.BreakContentMode != DecoMode.Override)"
Label="Multi Collection"
@bind-value="_selectedBreakContent.MultiCollection">
@foreach (MultiCollectionViewModel collection in _multiCollections)
{
<MudSelectItem Value="@collection">@collection.Name</MudSelectItem>
}
</MudSelect>
}
@if (_selectedBreakContent.CollectionType == ProgramScheduleItemCollectionType.SmartCollection)
{
<MudSelect Class="mt-3"
T="SmartCollectionViewModel"
Disabled="@(_deco.BreakContentMode != DecoMode.Override)"
Label="Smart Collection"
@bind-value="_selectedBreakContent.SmartCollection">
@foreach (SmartCollectionViewModel collection in _smartCollections)
{
<MudSelectItem Value="@collection">@collection.Name</MudSelectItem>
}
</MudSelect>
}
@if (_selectedBreakContent.CollectionType == ProgramScheduleItemCollectionType.TelevisionShow)
{
<MudSelect Class="mt-3"
T="NamedMediaItemViewModel"
Disabled="@(_deco.BreakContentMode != DecoMode.Override)"
Label="Television Show"
@bind-value="_selectedBreakContent.MediaItem">
@foreach (NamedMediaItemViewModel show in _televisionShows)
{
<MudSelectItem Value="@show">@show.Name</MudSelectItem>
}
</MudSelect>
}
@if (_selectedBreakContent.CollectionType == ProgramScheduleItemCollectionType.TelevisionSeason)
{
<MudSelect Class="mt-3"
T="NamedMediaItemViewModel"
Disabled="@(_deco.BreakContentMode != DecoMode.Override)"
Label="Television Season"
@bind-value="_selectedBreakContent.MediaItem">
@foreach (NamedMediaItemViewModel season in _televisionSeasons)
{
<MudSelectItem Value="@season">@season.Name</MudSelectItem>
}
</MudSelect>
}
@if (_selectedBreakContent.CollectionType == ProgramScheduleItemCollectionType.Artist)
{
<MudSelect Class="mt-3"
T="NamedMediaItemViewModel"
Disabled="@(_deco.BreakContentMode != DecoMode.Override)"
Label="Artist"
@bind-value="_selectedBreakContent.MediaItem">
@foreach (NamedMediaItemViewModel artist in _artists)
{
<MudSelectItem Value="@artist">@artist.Name</MudSelectItem>
}
</MudSelect>
}
</MudCardContent>
</MudCard>
</MudStack>
@ -318,6 +409,7 @@ @@ -318,6 +409,7 @@
private List<NamedMediaItemViewModel> _televisionSeasons = [];
private List<NamedMediaItemViewModel> _artists = [];
private DecoBreakContentEditViewModel _selectedBreakContent = new();
public void Dispose()
{
@ -369,34 +461,34 @@ @@ -369,34 +461,34 @@
DefaultFillerMode = deco.DefaultFillerMode,
DefaultFillerCollectionType = deco.DefaultFillerCollectionType,
DefaultFillerCollection = deco.DefaultFillerCollectionId.HasValue
? _mediaCollections.Find(c => c.Id == deco.DefaultFillerCollectionId.Value)
? _mediaCollections.Find(c => c.Id == deco.DefaultFillerCollectionId!.Value)
: null,
DefaultFillerMediaItem = deco.DefaultFillerMediaItemId.HasValue
? _televisionShows.Append(_televisionSeasons).Append(_artists).ToList()
.Find(vm => vm.MediaItemId == deco.DefaultFillerMediaItemId.Value)
.Find(vm => vm.MediaItemId == deco.DefaultFillerMediaItemId!.Value)
: null,
DefaultFillerMultiCollection = deco.DefaultFillerMultiCollectionId.HasValue
? _multiCollections.Find(c => c.Id == deco.DefaultFillerMultiCollectionId.Value)
? _multiCollections.Find(c => c.Id == deco.DefaultFillerMultiCollectionId!.Value)
: null,
DefaultFillerSmartCollection = deco.DefaultFillerSmartCollectionId.HasValue
? _smartCollections.Find(c => c.Id == deco.DefaultFillerSmartCollectionId.Value)
? _smartCollections.Find(c => c.Id == deco.DefaultFillerSmartCollectionId!.Value)
: null,
DefaultFillerTrimToFit = deco.DefaultFillerTrimToFit,
DeadAirFallbackMode = deco.DeadAirFallbackMode,
DeadAirFallbackCollectionType = deco.DeadAirFallbackCollectionType,
DeadAirFallbackCollection = deco.DeadAirFallbackCollectionId.HasValue
? _mediaCollections.Find(c => c.Id == deco.DeadAirFallbackCollectionId.Value)
? _mediaCollections.Find(c => c.Id == deco.DeadAirFallbackCollectionId!.Value)
: null,
DeadAirFallbackMediaItem = deco.DeadAirFallbackMediaItemId.HasValue
? _televisionShows.Append(_televisionSeasons).Append(_artists).ToList()
.Find(vm => vm.MediaItemId == deco.DeadAirFallbackMediaItemId.Value)
.Find(vm => vm.MediaItemId == deco.DeadAirFallbackMediaItemId!.Value)
: null,
DeadAirFallbackMultiCollection = deco.DeadAirFallbackMultiCollectionId.HasValue
? _multiCollections.Find(c => c.Id == deco.DeadAirFallbackMultiCollectionId.Value)
? _multiCollections.Find(c => c.Id == deco.DeadAirFallbackMultiCollectionId!.Value)
: null,
DeadAirFallbackSmartCollection = deco.DeadAirFallbackSmartCollectionId.HasValue
? _smartCollections.Find(c => c.Id == deco.DeadAirFallbackSmartCollectionId.Value)
? _smartCollections.Find(c => c.Id == deco.DeadAirFallbackSmartCollectionId!.Value)
: null
};
}

Loading…
Cancel
Save