mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-23 15:30:56 -04:00
Fixed Person creation
This commit is contained in:
parent
6b371ba04f
commit
7c51b37ca0
@ -2923,6 +2923,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
|
|
||||||
var itemUpdateType = ItemUpdateType.MetadataDownload;
|
var itemUpdateType = ItemUpdateType.MetadataDownload;
|
||||||
var saveEntity = false;
|
var saveEntity = false;
|
||||||
|
var createEntity = false;
|
||||||
var personEntity = GetPerson(person.Name);
|
var personEntity = GetPerson(person.Name);
|
||||||
|
|
||||||
if (personEntity is null)
|
if (personEntity is null)
|
||||||
@ -2939,6 +2940,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
|
|
||||||
personEntity.PresentationUniqueKey = personEntity.CreatePresentationUniqueKey();
|
personEntity.PresentationUniqueKey = personEntity.CreatePresentationUniqueKey();
|
||||||
saveEntity = true;
|
saveEntity = true;
|
||||||
|
createEntity = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var id in person.ProviderIds)
|
foreach (var id in person.ProviderIds)
|
||||||
@ -2965,8 +2967,12 @@ namespace Emby.Server.Implementations.Library
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (saveEntity)
|
if (saveEntity)
|
||||||
|
{
|
||||||
|
if (createEntity)
|
||||||
{
|
{
|
||||||
CreateItems([personEntity], null, CancellationToken.None);
|
CreateItems([personEntity], null, CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
await RunMetadataSavers(personEntity, itemUpdateType).ConfigureAwait(false);
|
await RunMetadataSavers(personEntity, itemUpdateType).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3023,7 +3029,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
{
|
{
|
||||||
var libraryOptions = CollectionFolder.GetLibraryOptions(virtualFolderPath);
|
var libraryOptions = CollectionFolder.GetLibraryOptions(virtualFolderPath);
|
||||||
|
|
||||||
libraryOptions.PathInfos = [..libraryOptions.PathInfos, pathInfo];
|
libraryOptions.PathInfos = [.. libraryOptions.PathInfos, pathInfo];
|
||||||
|
|
||||||
SyncLibraryOptionsToLocations(virtualFolderPath, libraryOptions);
|
SyncLibraryOptionsToLocations(virtualFolderPath, libraryOptions);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user