add smart collections (#355)

* start to add smart collections

* add smart collection table; delete smart collection

* overwrite smart collections

* support scheduling smart collections

* update changelog
This commit is contained in:
Jason Dove
2021-09-10 11:58:24 -05:00
committed by GitHub
parent d8b4d00a73
commit fc360602ad
55 changed files with 10201 additions and 52 deletions
@@ -14,7 +14,7 @@ namespace ErsatzTV.Infrastructure.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "5.0.8");
.HasAnnotation("ProductVersion", "5.0.9");
modelBuilder.Entity("ErsatzTV.Core.Domain.Actor", b =>
{
@@ -1106,6 +1106,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Property<int>("ProgramScheduleId")
.HasColumnType("INTEGER");
b.Property<int?>("SmartCollectionId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("CollectionId");
@@ -1118,6 +1121,8 @@ namespace ErsatzTV.Infrastructure.Migrations
b.HasIndex("ProgramScheduleId");
b.HasIndex("SmartCollectionId");
b.ToTable("PlayoutProgramScheduleAnchor");
});
@@ -1218,6 +1223,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Property<int>("ProgramScheduleId")
.HasColumnType("INTEGER");
b.Property<int?>("SmartCollectionId")
.HasColumnType("INTEGER");
b.Property<TimeSpan?>("StartTime")
.HasColumnType("TEXT");
@@ -1231,6 +1239,8 @@ namespace ErsatzTV.Infrastructure.Migrations
b.HasIndex("ProgramScheduleId");
b.HasIndex("SmartCollectionId");
b.ToTable("ProgramScheduleItem");
});
@@ -1349,6 +1359,23 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ShowMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SmartCollection", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.Property<string>("Query")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("SmartCollection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Studio", b =>
{
b.Property<int>("Id")
@@ -2338,6 +2365,10 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("ErsatzTV.Core.Domain.SmartCollection", "SmartCollection")
.WithMany()
.HasForeignKey("SmartCollectionId");
b.OwnsOne("ErsatzTV.Core.Domain.CollectionEnumeratorState", "EnumeratorState", b1 =>
{
b1.Property<int>("PlayoutProgramScheduleAnchorId")
@@ -2368,6 +2399,8 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Playout");
b.Navigation("ProgramSchedule");
b.Navigation("SmartCollection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexConnection", b =>
@@ -2415,6 +2448,10 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("ErsatzTV.Core.Domain.SmartCollection", "SmartCollection")
.WithMany()
.HasForeignKey("SmartCollectionId");
b.Navigation("Collection");
b.Navigation("MediaItem");
@@ -2422,6 +2459,8 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MultiCollection");
b.Navigation("ProgramSchedule");
b.Navigation("SmartCollection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>