mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-03 13:44:22 -04:00
Fixed storage of Person images
This commit is contained in:
parent
e43e34eab8
commit
6b371ba04f
@ -2917,8 +2917,6 @@ namespace Emby.Server.Implementations.Library
|
|||||||
|
|
||||||
private async Task SavePeopleMetadataAsync(IEnumerable<PersonInfo> people, CancellationToken cancellationToken)
|
private async Task SavePeopleMetadataAsync(IEnumerable<PersonInfo> people, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
List<BaseItem>? personsToSave = null;
|
|
||||||
|
|
||||||
foreach (var person in people)
|
foreach (var person in people)
|
||||||
{
|
{
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
@ -2968,15 +2966,10 @@ namespace Emby.Server.Implementations.Library
|
|||||||
|
|
||||||
if (saveEntity)
|
if (saveEntity)
|
||||||
{
|
{
|
||||||
(personsToSave ??= new()).Add(personEntity);
|
CreateItems([personEntity], null, CancellationToken.None);
|
||||||
await RunMetadataSavers(personEntity, itemUpdateType).ConfigureAwait(false);
|
await RunMetadataSavers(personEntity, itemUpdateType).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (personsToSave is not null)
|
|
||||||
{
|
|
||||||
CreateItems(personsToSave, null, CancellationToken.None);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartScanInBackground()
|
private void StartScanInBackground()
|
||||||
|
@ -1339,11 +1339,13 @@ public sealed class BaseItemRepository(
|
|||||||
}
|
}
|
||||||
|
|
||||||
using var context = dbProvider.CreateDbContext();
|
using var context = dbProvider.CreateDbContext();
|
||||||
var item = context.BaseItems
|
var item = PrepareItemQuery(context, new()
|
||||||
.Include(e => e.TrailerTypes)
|
{
|
||||||
.Include(e => e.Provider)
|
DtoOptions = new()
|
||||||
.Include(e => e.Images)
|
{
|
||||||
.Include(e => e.LockedFields).AsNoTracking().AsSingleQuery().FirstOrDefault(e => e.Id == id);
|
EnableImages = true
|
||||||
|
}
|
||||||
|
}).FirstOrDefault(e => e.Id == id);
|
||||||
if (item is null)
|
if (item is null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user