add multi collections (#315)

* start to add multi-collections

* create multi collection with no items

* edit multi collections

* fix plex credentials threading issue

* add playback order to multi collection items

* group episodes outside of shuffled enumerator

* move playback order onto each schedule item

* fix multi collection grouping

* update changelog
This commit is contained in:
Jason Dove
2021-07-17 21:45:41 -05:00
committed by GitHub
parent 4000c6bc0a
commit 632753ea93
87 changed files with 10828 additions and 197 deletions
@@ -14,7 +14,7 @@ namespace ErsatzTV.Infrastructure.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "5.0.7");
.HasAnnotation("ProductVersion", "5.0.8");
modelBuilder.Entity("ErsatzTV.Core.Domain.Actor", b =>
{
@@ -944,6 +944,41 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MovieMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MultiCollection", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("MultiCollection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MultiCollectionItem", b =>
{
b.Property<int>("MultiCollectionId")
.HasColumnType("INTEGER");
b.Property<int>("CollectionId")
.HasColumnType("INTEGER");
b.Property<int>("PlaybackOrder")
.HasColumnType("INTEGER");
b.Property<bool>("ScheduleAsGroup")
.HasColumnType("INTEGER");
b.HasKey("MultiCollectionId", "CollectionId");
b.HasIndex("CollectionId");
b.ToTable("MultiCollectionItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MusicVideoMetadata", b =>
{
b.Property<int>("Id")
@@ -1062,6 +1097,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Property<int?>("MediaItemId")
.HasColumnType("INTEGER");
b.Property<int?>("MultiCollectionId")
.HasColumnType("INTEGER");
b.Property<int>("PlayoutId")
.HasColumnType("INTEGER");
@@ -1074,6 +1112,8 @@ namespace ErsatzTV.Infrastructure.Migrations
b.HasIndex("MediaItemId");
b.HasIndex("MultiCollectionId");
b.HasIndex("PlayoutId");
b.HasIndex("ProgramScheduleId");
@@ -1134,9 +1174,6 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Property<bool>("KeepMultiPartEpisodesTogether")
.HasColumnType("INTEGER");
b.Property<int>("MediaCollectionPlaybackOrder")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
@@ -1172,6 +1209,12 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Property<int?>("MediaItemId")
.HasColumnType("INTEGER");
b.Property<int?>("MultiCollectionId")
.HasColumnType("INTEGER");
b.Property<int>("PlaybackOrder")
.HasColumnType("INTEGER");
b.Property<int>("ProgramScheduleId")
.HasColumnType("INTEGER");
@@ -1184,6 +1227,8 @@ namespace ErsatzTV.Infrastructure.Migrations
b.HasIndex("MediaItemId");
b.HasIndex("MultiCollectionId");
b.HasIndex("ProgramScheduleId");
b.ToTable("ProgramScheduleItem");
@@ -2156,6 +2201,25 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Movie");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MultiCollectionItem", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany("MultiCollectionItems")
.HasForeignKey("CollectionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("ErsatzTV.Core.Domain.MultiCollection", "MultiCollection")
.WithMany("MultiCollectionItems")
.HasForeignKey("MultiCollectionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Collection");
b.Navigation("MultiCollection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MusicVideoMetadata", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MusicVideo", "MusicVideo")
@@ -2257,6 +2321,11 @@ namespace ErsatzTV.Infrastructure.Migrations
.HasForeignKey("MediaItemId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.MultiCollection", "MultiCollection")
.WithMany()
.HasForeignKey("MultiCollectionId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.Playout", "Playout")
.WithMany("ProgramScheduleAnchors")
.HasForeignKey("PlayoutId")
@@ -2294,6 +2363,8 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaItem");
b.Navigation("MultiCollection");
b.Navigation("Playout");
b.Navigation("ProgramSchedule");
@@ -2333,6 +2404,11 @@ namespace ErsatzTV.Infrastructure.Migrations
.HasForeignKey("MediaItemId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.MultiCollection", "MultiCollection")
.WithMany()
.HasForeignKey("MultiCollectionId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("ErsatzTV.Core.Domain.ProgramSchedule", "ProgramSchedule")
.WithMany("Items")
.HasForeignKey("ProgramScheduleId")
@@ -2343,6 +2419,8 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaItem");
b.Navigation("MultiCollection");
b.Navigation("ProgramSchedule");
});
@@ -2781,6 +2859,8 @@ namespace ErsatzTV.Infrastructure.Migrations
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b =>
{
b.Navigation("CollectionItems");
b.Navigation("MultiCollectionItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
@@ -2850,6 +2930,11 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Writers");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MultiCollection", b =>
{
b.Navigation("MultiCollectionItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MusicVideoMetadata", b =>
{
b.Navigation("Actors");