Browse Source

add new fields to database

pull/2802/head
Jason Dove 6 months ago
parent
commit
82841a4f94
No known key found for this signature in database
  1. 8
      ErsatzTV.Core/Domain/FFmpegProfile.cs
  2. 7039
      ErsatzTV.Infrastructure.MySql/Migrations/20260127040133_Add_FFmpegProfileNormalizationOptions.Designer.cs
  3. 51
      ErsatzTV.Infrastructure.MySql/Migrations/20260127040133_Add_FFmpegProfileNormalizationOptions.cs
  4. 15
      ErsatzTV.Infrastructure.MySql/Migrations/TvContextModelSnapshot.cs
  5. 6866
      ErsatzTV.Infrastructure.Sqlite/Migrations/20260127040052_Add_FFmpegProfileNormalizationOptions.Designer.cs
  6. 51
      ErsatzTV.Infrastructure.Sqlite/Migrations/20260127040052_Add_FFmpegProfileNormalizationOptions.cs
  7. 15
      ErsatzTV.Infrastructure.Sqlite/Migrations/TvContextModelSnapshot.cs
  8. 9
      ErsatzTV.Infrastructure/Data/Configurations/FFmpegProfileConfiguration.cs

8
ErsatzTV.Core/Domain/FFmpegProfile.cs

@ -7,6 +7,8 @@ public record FFmpegProfile @@ -7,6 +7,8 @@ public record FFmpegProfile
public int Id { get; set; }
public string Name { get; set; }
public int ThreadCount { get; set; }
public bool NormalizeAudio { get; set; }
public bool NormalizeVideo { get; set; }
public HardwareAccelerationKind HardwareAcceleration { get; set; }
public string VaapiDisplay { get; set; }
public VaapiDriver VaapiDriver { get; set; }
@ -32,6 +34,7 @@ public record FFmpegProfile @@ -32,6 +34,7 @@ public record FFmpegProfile
public int AudioChannels { get; set; }
public int AudioSampleRate { get; set; }
public bool NormalizeFramerate { get; set; }
public bool NormalizeColors { get; set; }
public bool? DeinterlaceVideo { get; set; }
public static FFmpegProfile New(string name, Resolution resolution) =>
@ -59,6 +62,9 @@ public record FFmpegProfile @@ -59,6 +62,9 @@ public record FFmpegProfile
DeinterlaceVideo = true,
NormalizeFramerate = false,
HardwareAcceleration = HardwareAccelerationKind.None,
QsvExtraHardwareFrames = 64
QsvExtraHardwareFrames = 64,
NormalizeAudio = true,
NormalizeVideo = true,
NormalizeColors = true
};
}

7039
ErsatzTV.Infrastructure.MySql/Migrations/20260127040133_Add_FFmpegProfileNormalizationOptions.Designer.cs generated

File diff suppressed because it is too large Load Diff

51
ErsatzTV.Infrastructure.MySql/Migrations/20260127040133_Add_FFmpegProfileNormalizationOptions.cs

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.MySql.Migrations
{
/// <inheritdoc />
public partial class Add_FFmpegProfileNormalizationOptions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "NormalizeAudio",
table: "FFmpegProfile",
type: "tinyint(1)",
nullable: false,
defaultValue: true);
migrationBuilder.AddColumn<bool>(
name: "NormalizeColors",
table: "FFmpegProfile",
type: "tinyint(1)",
nullable: false,
defaultValue: true);
migrationBuilder.AddColumn<bool>(
name: "NormalizeVideo",
table: "FFmpegProfile",
type: "tinyint(1)",
nullable: false,
defaultValue: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "NormalizeAudio",
table: "FFmpegProfile");
migrationBuilder.DropColumn(
name: "NormalizeColors",
table: "FFmpegProfile");
migrationBuilder.DropColumn(
name: "NormalizeVideo",
table: "FFmpegProfile");
}
}
}

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

@ -757,6 +757,16 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations @@ -757,6 +757,16 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
b.Property<string>("Name")
.HasColumnType("longtext");
b.Property<bool>("NormalizeAudio")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(true);
b.Property<bool>("NormalizeColors")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(true);
b.Property<bool>("NormalizeFramerate")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
@ -765,6 +775,11 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations @@ -765,6 +775,11 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
b.Property<int>("NormalizeLoudnessMode")
.HasColumnType("int");
b.Property<bool>("NormalizeVideo")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(true);
b.Property<int>("PadMode")
.HasColumnType("int");

6866
ErsatzTV.Infrastructure.Sqlite/Migrations/20260127040052_Add_FFmpegProfileNormalizationOptions.Designer.cs generated

File diff suppressed because it is too large Load Diff

51
ErsatzTV.Infrastructure.Sqlite/Migrations/20260127040052_Add_FFmpegProfileNormalizationOptions.cs

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
{
/// <inheritdoc />
public partial class Add_FFmpegProfileNormalizationOptions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "NormalizeAudio",
table: "FFmpegProfile",
type: "INTEGER",
nullable: false,
defaultValue: true);
migrationBuilder.AddColumn<bool>(
name: "NormalizeColors",
table: "FFmpegProfile",
type: "INTEGER",
nullable: false,
defaultValue: true);
migrationBuilder.AddColumn<bool>(
name: "NormalizeVideo",
table: "FFmpegProfile",
type: "INTEGER",
nullable: false,
defaultValue: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "NormalizeAudio",
table: "FFmpegProfile");
migrationBuilder.DropColumn(
name: "NormalizeColors",
table: "FFmpegProfile");
migrationBuilder.DropColumn(
name: "NormalizeVideo",
table: "FFmpegProfile");
}
}
}

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

@ -726,6 +726,16 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations @@ -726,6 +726,16 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations
b.Property<string>("Name")
.HasColumnType("TEXT");
b.Property<bool>("NormalizeAudio")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(true);
b.Property<bool>("NormalizeColors")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(true);
b.Property<bool>("NormalizeFramerate")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
@ -734,6 +744,11 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations @@ -734,6 +744,11 @@ namespace ErsatzTV.Infrastructure.Sqlite.Migrations
b.Property<int>("NormalizeLoudnessMode")
.HasColumnType("INTEGER");
b.Property<bool>("NormalizeVideo")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(true);
b.Property<int>("PadMode")
.HasColumnType("INTEGER");

9
ErsatzTV.Infrastructure/Data/Configurations/FFmpegProfileConfiguration.cs

@ -15,5 +15,14 @@ public class FFmpegProfileConfiguration : IEntityTypeConfiguration<FFmpegProfile @@ -15,5 +15,14 @@ public class FFmpegProfileConfiguration : IEntityTypeConfiguration<FFmpegProfile
builder.Property(p => p.DeinterlaceVideo)
.HasDefaultValue(true);
builder.Property(p => p.NormalizeAudio)
.HasDefaultValue(true);
builder.Property(p => p.NormalizeVideo)
.HasDefaultValue(true);
builder.Property(p => p.NormalizeColors)
.HasDefaultValue(true);
}
}

Loading…
Cancel
Save