fix interlaced check again (#2623)
* fix interlaced check again * add interlaced ratio to media item info
This commit is contained in:
@@ -15,6 +15,7 @@ public record MediaItemInfo(
|
||||
string DisplayAspectRatio,
|
||||
string RFrameRate,
|
||||
VideoScanKind VideoScanKind,
|
||||
double? InterlacedRatio,
|
||||
int Width,
|
||||
int Height,
|
||||
List<MediaItemInfoStream> Streams,
|
||||
|
||||
@@ -147,6 +147,7 @@ public class GetMediaItemInfoHandler : IRequestHandler<GetMediaItemInfo, Either<
|
||||
version.DisplayAspectRatio,
|
||||
version.RFrameRate,
|
||||
version.VideoScanKind,
|
||||
version.InterlacedRatio,
|
||||
version.Width,
|
||||
version.Height,
|
||||
allStreams,
|
||||
|
||||
6870
ErsatzTV.Infrastructure.MySql/Migrations/20251110150901_Reset_InterlacedRatioAgain.Designer.cs
generated
Normal file
6870
ErsatzTV.Infrastructure.MySql/Migrations/20251110150901_Reset_InterlacedRatioAgain.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
Normal file
6697
ErsatzTV.Infrastructure.Sqlite/Migrations/20251110150831_Reset_InterlacedRatioAgain.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
Executable file
21
scripts/add-migration.sh
Executable file
@@ -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
|
||||
Reference in New Issue
Block a user