Browse Source

fix interlaced check again

pull/2623/head
Jason Dove 9 months ago
parent
commit
d91dc41b1d
No known key found for this signature in database
  1. 6870
      ErsatzTV.Infrastructure.MySql/Migrations/20251110150901_Reset_InterlacedRatioAgain.Designer.cs
  2. 21
      ErsatzTV.Infrastructure.MySql/Migrations/20251110150901_Reset_InterlacedRatioAgain.cs
  3. 6697
      ErsatzTV.Infrastructure.Sqlite/Migrations/20251110150831_Reset_InterlacedRatioAgain.Designer.cs
  4. 21
      ErsatzTV.Infrastructure.Sqlite/Migrations/20251110150831_Reset_InterlacedRatioAgain.cs
  5. 2
      ErsatzTV.Infrastructure/Metadata/LocalStatisticsProvider.cs
  6. 21
      scripts/add-migration.sh

6870
ErsatzTV.Infrastructure.MySql/Migrations/20251110150901_Reset_InterlacedRatioAgain.Designer.cs generated

File diff suppressed because it is too large Load Diff

21
ErsatzTV.Infrastructure.MySql/Migrations/20251110150901_Reset_InterlacedRatioAgain.cs

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.MySql.Migrations
{
/// <inheritdoc />
public partial class Reset_InterlacedRatioAgain : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("UPDATE MediaVersion SET InterlacedRatio = null;");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

6697
ErsatzTV.Infrastructure.Sqlite/Migrations/20251110150831_Reset_InterlacedRatioAgain.Designer.cs generated

File diff suppressed because it is too large Load Diff

21
ErsatzTV.Infrastructure.Sqlite/Migrations/20251110150831_Reset_InterlacedRatioAgain.cs

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
{
/// <inheritdoc />
public partial class Reset_InterlacedRatioAgain : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("UPDATE MediaVersion SET InterlacedRatio = null;");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

2
ErsatzTV.Infrastructure/Metadata/LocalStatisticsProvider.cs

@ -166,7 +166,7 @@ public partial class LocalStatisticsProvider : ILocalStatisticsProvider @@ -166,7 +166,7 @@ public partial class LocalStatisticsProvider : ILocalStatisticsProvider
return 0;
}
return (double)stats.TotalInterlacedFrames / stats.TotalInterlacedFrames;
return (double)stats.TotalInterlacedFrames / stats.TotalFrames;
}
}
catch (Exception ex)

21
scripts/add-migration.sh

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
#! /usr/bin/env bash
if [[ $# -eq 0 ]] ; then
echo 'Please specify a unique migration name'
exit 1
fi
ROOT="$(git rev-parse --show-toplevel)"
cd "$ROOT/ErsatzTV.Infrastructure" || exit
dotnet ef migrations add $1 \
--context TvContext \
--startup-project "$ROOT/ErsatzTV" \
--project "$ROOT/ErsatzTV.Infrastructure.Sqlite" \
-- --provider Sqlite && \
dotnet ef migrations add $1 \
--context TvContext \
--startup-project "$ROOT/ErsatzTV" \
--project "$ROOT/ErsatzTV.Infrastructure.MySql" \
-- --provider MySql
Loading…
Cancel
Save