Merge remote-tracking branch 'upstream/master' into search-rebased

This commit is contained in:
Shadowghost
2026-05-12 22:50:16 +02:00
185 changed files with 9112 additions and 1204 deletions

View File

@@ -96,6 +96,8 @@ public class BaseItemEntity
public string? OriginalTitle { get; set; }
public string? OriginalLanguage { get; set; }
public Guid? PrimaryVersionId { get; set; }
public DateTime? DateLastMediaAdded { get; set; }

View File

@@ -62,6 +62,16 @@ namespace Jellyfin.Database.Implementations.Entities.Libraries
[StringLength(1024)]
public string? OriginalTitle { get; set; }
/// <summary>
/// Gets or sets the original language.
/// </summary>
/// <remarks>
/// Max length = 1024.
/// </remarks>
[MaxLength(1024)]
[StringLength(1024)]
public string? OriginalLanguage { get; set; }
/// <summary>
/// Gets or sets the sort title.
/// </summary>

View File

@@ -40,6 +40,8 @@ public class MediaStreamInfo
public bool IsExternal { get; set; }
public bool IsOriginal { get; set; }
public int? Height { get; set; }
public int? Width { get; set; }

View File

@@ -73,6 +73,10 @@ public class BaseItemConfiguration : IEntityTypeConfiguration<BaseItemEntity>
builder.HasIndex(e => e.SeasonId);
builder.HasIndex(e => e.SeriesId);
// Items/Counts: SELECT Type, COUNT(*) GROUP BY Type filtered by TopParentId.
builder.HasIndex(e => new { e.TopParentId, e.Type, e.IsVirtualItem })
.HasFilter("\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)");
builder.HasData(new BaseItemEntity()
{
Id = Guid.Parse("00000000-0000-0000-0000-000000000001"),

View File

@@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Jellyfin.Database.Providers.Sqlite.Migrations
{
/// <inheritdoc />
public partial class AddPartialIndexForItemCounts : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_BaseItems_TopParentId_Type_IsVirtualItem",
table: "BaseItems",
columns: new[] { "TopParentId", "Type", "IsVirtualItem" },
filter: "\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_BaseItems_TopParentId_Type_IsVirtualItem",
table: "BaseItems");
}
}
}

View File

@@ -0,0 +1,47 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Jellyfin.Database.Providers.Sqlite.Migrations
{
/// <inheritdoc />
public partial class AddOriginalLanguage : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsOriginal",
table: "MediaStreamInfos",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "OriginalLanguage",
table: "BaseItems",
type: "TEXT",
nullable: true);
migrationBuilder.UpdateData(
table: "BaseItems",
keyColumn: "Id",
keyValue: new Guid("00000000-0000-0000-0000-000000000001"),
column: "OriginalLanguage",
value: null);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsOriginal",
table: "MediaStreamInfos");
migrationBuilder.DropColumn(
name: "OriginalLanguage",
table: "BaseItems");
}
}
}

View File

@@ -15,7 +15,7 @@ namespace Jellyfin.Server.Implementations.Migrations
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.3");
modelBuilder.HasAnnotation("ProductVersion", "10.0.7");
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
{
@@ -264,6 +264,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Property<string>("OfficialRating")
.HasColumnType("TEXT");
b.Property<string>("OriginalLanguage")
.HasColumnType("TEXT");
b.Property<string>("OriginalTitle")
.HasColumnType("TEXT");
@@ -382,6 +385,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("Type", "CleanName");
b.HasIndex("TopParentId", "Type", "IsVirtualItem")
.HasFilter("\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)");
b.HasIndex("Type", "TopParentId", "Id");
b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
@@ -952,6 +958,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Property<bool?>("IsInterlaced")
.HasColumnType("INTEGER");
b.Property<bool>("IsOriginal")
.HasColumnType("INTEGER");
b.Property<string>("KeyFrames")
.HasColumnType("TEXT");