mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Fixed FUCKING TopParentId
This commit is contained in:
parent
7c51b37ca0
commit
a71187ebcc
@ -1272,6 +1272,9 @@ public sealed class BaseItemRepository(
|
|||||||
foreach (var item in tuples)
|
foreach (var item in tuples)
|
||||||
{
|
{
|
||||||
var entity = Map(item.Item);
|
var entity = Map(item.Item);
|
||||||
|
// TODO: refactor this "inconsistency"
|
||||||
|
entity.TopParentId = item.TopParent?.Id;
|
||||||
|
|
||||||
if (!context.BaseItems.Any(e => e.Id == entity.Id))
|
if (!context.BaseItems.Any(e => e.Id == entity.Id))
|
||||||
{
|
{
|
||||||
context.BaseItems.Add(entity);
|
context.BaseItems.Add(entity);
|
||||||
@ -1488,7 +1491,7 @@ public sealed class BaseItemRepository(
|
|||||||
|
|
||||||
// dto.Type = entity.Type;
|
// dto.Type = entity.Type;
|
||||||
// dto.Data = entity.Data;
|
// dto.Data = entity.Data;
|
||||||
// dto.MediaType = entity.MediaType;
|
// dto.MediaType = Enum.TryParse<MediaType>(entity.MediaType);
|
||||||
if (dto is IHasStartDate hasStartDate)
|
if (dto is IHasStartDate hasStartDate)
|
||||||
{
|
{
|
||||||
hasStartDate.StartDate = entity.StartDate;
|
hasStartDate.StartDate = entity.StartDate;
|
||||||
@ -1661,7 +1664,7 @@ public sealed class BaseItemRepository(
|
|||||||
|
|
||||||
// dto.Type = entity.Type;
|
// dto.Type = entity.Type;
|
||||||
// dto.Data = entity.Data;
|
// dto.Data = entity.Data;
|
||||||
// dto.MediaType = entity.MediaType;
|
entity.MediaType = dto.MediaType.ToString();
|
||||||
if (dto is IHasStartDate hasStartDate)
|
if (dto is IHasStartDate hasStartDate)
|
||||||
{
|
{
|
||||||
entity.StartDate = hasStartDate.StartDate;
|
entity.StartDate = hasStartDate.StartDate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user