Browse Source

code cleanup

pull/41/head
Jason Dove 5 years ago
parent
commit
41bbb4fde1
  1. 7
      ErsatzTV.Core.Tests/FFmpeg/FFmpegComplexFilterBuilderTests.cs
  2. 2
      ErsatzTV.Core.Tests/FFmpeg/FFmpegPlaybackSettingsServiceTests.cs
  3. 2
      ErsatzTV.Core/FFmpeg/FFmpegComplexFilterBuilder.cs
  4. 18
      ErsatzTV.Infrastructure/Migrations/20210302224925_Add_FFmpegProfileHardwareAcceleration.cs
  5. 380
      ErsatzTV.Infrastructure/Migrations/TvContextModelSnapshot.cs
  6. 5
      ErsatzTV/Validators/FFmpegProfileEditViewModelValidator.cs

7
ErsatzTV.Core.Tests/FFmpeg/FFmpegComplexFilterBuilderTests.cs

@ -133,7 +133,12 @@ namespace ErsatzTV.Core.Tests.FFmpeg @@ -133,7 +133,12 @@ namespace ErsatzTV.Core.Tests.FFmpeg
true,
"[0:v]deinterlace_qsv,scale_qsv=w=1920:h=1000,hwdownload,format=nv12,setsar=1,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,hwupload=extra_hw_frames=64[v]",
"[v]")]
[TestCase(false, true, false, "[0:v]scale_qsv=w=1920:h=1000,hwdownload,format=nv12,setsar=1,hwupload=extra_hw_frames=64[v]", "[v]")]
[TestCase(
false,
true,
false,
"[0:v]scale_qsv=w=1920:h=1000,hwdownload,format=nv12,setsar=1,hwupload=extra_hw_frames=64[v]",
"[v]")]
[TestCase(
false,
false,

2
ErsatzTV.Core.Tests/FFmpeg/FFmpegPlaybackSettingsServiceTests.cs

@ -273,7 +273,7 @@ namespace ErsatzTV.Core.Tests.FFmpeg @@ -273,7 +273,7 @@ namespace ErsatzTV.Core.Tests.FFmpeg
actual.ScaledSize.IsNone.Should().BeTrue();
actual.PadToDesiredResolution.Should().BeFalse();
}
[Test]
public void Should_NotPadToDesiredResolution_When_NotNormalizingResolution()
{

2
ErsatzTV.Core/FFmpeg/FFmpegComplexFilterBuilder.cs

@ -105,7 +105,7 @@ namespace ErsatzTV.Core.FFmpeg @@ -105,7 +105,7 @@ namespace ErsatzTV.Core.FFmpeg
if (acceleration != HardwareAccelerationKind.None)
{
filterQueue.Add("hwdownload");
if ((_scaleToSize.IsNone && acceleration == HardwareAccelerationKind.Nvenc) ||
if (_scaleToSize.IsNone && acceleration == HardwareAccelerationKind.Nvenc ||
acceleration == HardwareAccelerationKind.Qsv)
{
filterQueue.Add("format=nv12");

18
ErsatzTV.Infrastructure/Migrations/20210302224925_Add_FFmpegProfileHardwareAcceleration.cs

@ -4,21 +4,17 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -4,21 +4,17 @@ namespace ErsatzTV.Infrastructure.Migrations
{
public partial class Add_FFmpegProfileHardwareAcceleration : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
protected override void Up(MigrationBuilder migrationBuilder) =>
migrationBuilder.AddColumn<int>(
name: "HardwareAcceleration",
table: "FFmpegProfile",
type: "INTEGER",
"HardwareAcceleration",
"FFmpegProfile",
"INTEGER",
nullable: false,
defaultValue: 0);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
protected override void Down(MigrationBuilder migrationBuilder) =>
migrationBuilder.DropColumn(
name: "HardwareAcceleration",
table: "FFmpegProfile");
}
"HardwareAcceleration",
"FFmpegProfile");
}
}

380
ErsatzTV.Infrastructure/Migrations/TvContextModelSnapshot.cs

@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
// <auto-generated />
using System;
using ErsatzTV.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ErsatzTV.Infrastructure.Migrations
{
[DbContext(typeof(TvContext))]
partial class TvContextModelSnapshot : ModelSnapshot
internal class TvContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
@ -16,7 +16,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -16,7 +16,9 @@ namespace ErsatzTV.Infrastructure.Migrations
modelBuilder
.HasAnnotation("ProductVersion", "5.0.3");
modelBuilder.Entity("ErsatzTV.Core.Domain.Artwork", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Artwork",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -64,7 +66,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -64,7 +66,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Channel",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -95,7 +99,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -95,7 +99,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Channel");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Collection",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -109,7 +115,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -109,7 +115,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Collection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.CollectionItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.CollectionItem",
b =>
{
b.Property<int>("CollectionId")
.HasColumnType("INTEGER");
@ -124,7 +132,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -124,7 +132,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("CollectionItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ConfigElement", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ConfigElement",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -144,7 +154,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -144,7 +154,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ConfigElement");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.EpisodeMetadata",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -193,7 +205,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -193,7 +205,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("EpisodeMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.FFmpegProfile", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.FFmpegProfile",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -260,7 +274,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -260,7 +274,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("FFmpegProfile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Library",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -285,7 +301,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -285,7 +301,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Library");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LibraryPath",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -304,7 +322,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -304,7 +322,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("LibraryPath");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaFile", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaFile",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -326,7 +346,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -326,7 +346,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MediaFile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaItem",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -342,7 +364,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -342,7 +364,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MediaItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaSource",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -353,7 +377,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -353,7 +377,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaVersion",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -407,7 +433,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -407,7 +433,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MediaVersion");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MovieMetadata",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -456,7 +484,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -456,7 +484,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MovieMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Playout",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -480,7 +510,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -480,7 +510,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Playout");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutItem",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -507,7 +539,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -507,7 +539,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlayoutItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -541,7 +575,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -541,7 +575,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlayoutProgramScheduleAnchor");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexConnection", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexConnection",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -563,7 +599,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -563,7 +599,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexConnection");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexPathReplacement", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexPathReplacement",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -585,7 +623,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -585,7 +623,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexPathReplacement");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramSchedule", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramSchedule",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -605,7 +645,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -605,7 +645,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramSchedule");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItem",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -640,7 +682,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -640,7 +682,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramScheduleItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Resolution", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Resolution",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -660,7 +704,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -660,7 +704,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Resolution");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.SeasonMetadata",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -703,7 +749,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -703,7 +749,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("SeasonMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ShowMetadata",
b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -752,14 +800,18 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -752,14 +800,18 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ShowMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalLibrary", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalLibrary",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Library");
b.ToTable("LocalLibrary");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexLibrary", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexLibrary",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Library");
@ -772,7 +824,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -772,7 +824,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexLibrary");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaFile", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaFile",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaFile");
@ -785,7 +839,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -785,7 +839,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexMediaFile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Episode", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Episode",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
@ -800,14 +856,18 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -800,14 +856,18 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Episode");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Movie", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Movie",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.ToTable("Movie");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Season", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Season",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
@ -822,21 +882,27 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -822,21 +882,27 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Season");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Show", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Show",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.ToTable("Show");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalMediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalMediaSource",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaSource");
b.ToTable("LocalMediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaSource",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaSource");
@ -852,7 +918,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -852,7 +918,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexMediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemDuration", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemDuration",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
@ -865,14 +933,18 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -865,14 +933,18 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramScheduleDurationItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemFlood", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemFlood",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
b.ToTable("ProgramScheduleFloodItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemMultiple", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemMultiple",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
@ -882,14 +954,18 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -882,14 +954,18 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramScheduleMultipleItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemOne", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemOne",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
b.ToTable("ProgramScheduleOneItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMovie", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMovie",
b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Movie");
@ -899,7 +975,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -899,7 +975,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexMovie");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Artwork", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Artwork",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Channel", null)
.WithMany("Artwork")
@ -927,7 +1005,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -927,7 +1005,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Channel",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.FFmpegProfile", "FFmpegProfile")
.WithMany()
@ -938,7 +1018,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -938,7 +1018,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("FFmpegProfile");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.CollectionItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.CollectionItem",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany("CollectionItems")
@ -957,7 +1039,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -957,7 +1039,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaItem");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.EpisodeMetadata",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Episode", "Episode")
.WithMany("EpisodeMetadata")
@ -968,7 +1052,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -968,7 +1052,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Episode");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.FFmpegProfile", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.FFmpegProfile",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Resolution", "Resolution")
.WithMany()
@ -979,7 +1065,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -979,7 +1065,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Resolution");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Library",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaSource", "MediaSource")
.WithMany("Libraries")
@ -990,7 +1078,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -990,7 +1078,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LibraryPath",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Library", "Library")
.WithMany("Paths")
@ -1001,7 +1091,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1001,7 +1091,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Library");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaFile", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaFile",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaVersion", "MediaVersion")
.WithMany("MediaFiles")
@ -1012,7 +1104,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1012,7 +1104,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaVersion");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaItem",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.LibraryPath", "LibraryPath")
.WithMany("MediaItems")
@ -1023,7 +1117,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1023,7 +1117,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("LibraryPath");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaVersion",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Episode", null)
.WithMany("MediaVersions")
@ -1036,7 +1132,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1036,7 +1132,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MovieMetadata",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Movie", "Movie")
.WithMany("MovieMetadata")
@ -1047,7 +1145,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1047,7 +1145,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Movie");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Playout",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Channel", "Channel")
.WithMany("Playouts")
@ -1061,7 +1161,10 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1061,7 +1161,10 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsOne("ErsatzTV.Core.Domain.PlayoutAnchor", "Anchor", b1 =>
b.OwnsOne(
"ErsatzTV.Core.Domain.PlayoutAnchor",
"Anchor",
b1 =>
{
b1.Property<int>("PlayoutId")
.HasColumnType("INTEGER");
@ -1097,7 +1200,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1097,7 +1200,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("ProgramSchedule");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutItem",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", "MediaItem")
.WithMany()
@ -1116,7 +1221,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1116,7 +1221,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Playout");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany()
@ -1140,7 +1247,10 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1140,7 +1247,10 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsOne("ErsatzTV.Core.Domain.CollectionEnumeratorState", "EnumeratorState", b1 =>
b.OwnsOne(
"ErsatzTV.Core.Domain.CollectionEnumeratorState",
"EnumeratorState",
b1 =>
{
b1.Property<int>("PlayoutProgramScheduleAnchorId")
.HasColumnType("INTEGER");
@ -1170,7 +1280,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1170,7 +1280,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("ProgramSchedule");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexConnection", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexConnection",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.PlexMediaSource", "PlexMediaSource")
.WithMany("Connections")
@ -1181,7 +1293,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1181,7 +1293,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("PlexMediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexPathReplacement", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexPathReplacement",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.PlexMediaSource", "PlexMediaSource")
.WithMany("PathReplacements")
@ -1192,7 +1306,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1192,7 +1306,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("PlexMediaSource");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItem", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItem",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany()
@ -1217,7 +1333,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1217,7 +1333,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("ProgramSchedule");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.SeasonMetadata",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Season", "Season")
.WithMany("SeasonMetadata")
@ -1228,7 +1346,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1228,7 +1346,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Season");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ShowMetadata",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Show", "Show")
.WithMany("ShowMetadata")
@ -1239,7 +1359,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1239,7 +1359,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Show");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalLibrary", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalLibrary",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Library", null)
.WithOne()
@ -1248,7 +1370,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1248,7 +1370,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexLibrary", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexLibrary",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Library", null)
.WithOne()
@ -1257,7 +1381,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1257,7 +1381,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaFile", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaFile",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaFile", null)
.WithOne()
@ -1266,7 +1392,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1266,7 +1392,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Episode", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Episode",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1283,7 +1411,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1283,7 +1411,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Season");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Movie", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Movie",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1292,7 +1422,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1292,7 +1422,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Season", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Season",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1309,7 +1441,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1309,7 +1441,9 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Show");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Show", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Show",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1318,7 +1452,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1318,7 +1452,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalMediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalMediaSource",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaSource", null)
.WithOne()
@ -1327,7 +1463,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1327,7 +1463,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaSource",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaSource", null)
.WithOne()
@ -1336,7 +1474,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1336,7 +1474,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemDuration", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemDuration",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1345,7 +1485,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1345,7 +1485,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemFlood", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemFlood",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1354,7 +1496,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1354,7 +1496,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemMultiple", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemMultiple",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1363,7 +1507,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1363,7 +1507,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemOne", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemOne",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1372,7 +1518,9 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1372,7 +1518,9 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMovie", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMovie",
b =>
{
b.HasOne("ErsatzTV.Core.Domain.Movie", null)
.WithOne()
@ -1381,106 +1529,92 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1381,106 +1529,92 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Channel",
b =>
{
b.Navigation("Artwork");
b.Navigation("Playouts");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b =>
{
b.Navigation("CollectionItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b => { b.Navigation("CollectionItems"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
{
b.Navigation("Paths");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b => { b.Navigation("Paths"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
{
b.Navigation("MediaItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b => { b.Navigation("MediaItems"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
{
b.Navigation("CollectionItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b => { b.Navigation("CollectionItems"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaSource", b =>
{
b.Navigation("Libraries");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaSource", b => { b.Navigation("Libraries"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
{
b.Navigation("MediaFiles");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b => { b.Navigation("MediaFiles"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Playout",
b =>
{
b.Navigation("Items");
b.Navigation("ProgramScheduleAnchors");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramSchedule", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramSchedule",
b =>
{
b.Navigation("Items");
b.Navigation("Playouts");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.Episode", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Episode",
b =>
{
b.Navigation("EpisodeMetadata");
b.Navigation("MediaVersions");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Movie", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Movie",
b =>
{
b.Navigation("MediaVersions");
b.Navigation("MovieMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Season", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Season",
b =>
{
b.Navigation("Episodes");
b.Navigation("SeasonMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Show", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Show",
b =>
{
b.Navigation("Seasons");
b.Navigation("ShowMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b =>
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaSource",
b =>
{
b.Navigation("Connections");

5
ErsatzTV/Validators/FFmpegProfileEditViewModelValidator.cs

@ -44,11 +44,8 @@ namespace ErsatzTV.Validators @@ -44,11 +44,8 @@ namespace ErsatzTV.Validators
{
RuleFor(x => x.VideoCodec).Must(c => NvencEncoders.Contains(c))
.WithMessage("NVENC codec is required (h264_nvenc, hevc_nvenc)");
// RuleFor(x => x.NormalizeResolution).Must(x => x == false)
// .WithMessage("Resolution normalization (scaling) is not yet supported with NVENC");
});
When(
x => x.HardwareAcceleration == HardwareAccelerationKind.Vaapi,
() =>

Loading…
Cancel
Save