Jump to content

PersonsService API


h.buckle

Recommended Posts

h.buckle

I picked up on a couple of issues with the Persons API

 

* Searching for a person not in the library returns a 500

2020-01-31 21:36:02.969 Info HttpServer: HTTP GET https://emby.crucible.org.uk/emby/Persons/test. UserAgent: Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.18362; en-GB) PowerShell/7.0.02020-01-31 21:36:02.985 Error HttpServer: Error processing request	*** Error Report ***	Version: 4.4.0.11	Command line: C:\embyserver\system\EmbyServer.dll -service	Operating system: Microsoft Windows NT 6.2.9200.0	64-Bit OS: True	64-Bit Process: True	User Interactive: True	Runtime: file:///C:/embyserver/system/System.Private.CoreLib.dll	System.Environment.Version: 3.1.1	Processor count: 4	Program data path: C:\embyserver\programdata	Application directory: C:\embyserver\system	System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.	   at Emby.Server.Implementations.Dto.DtoService.AttachPeople(BaseItemDto dto, BaseItem item, DtoOptions options)	   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user)	   at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDto(BaseItem item, DtoOptions options, User user)	   at MediaBrowser.Api.UserLibrary.PersonsService.GetItem(GetPerson request)	   at lambda_method(Closure , Object , Object )	   at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)	Source: Emby.Server.Implementations	TargetSite: Void AttachPeople(MediaBrowser.Model.Dto.BaseItemDto, MediaBrowser.Controller.Entities.BaseItem, MediaBrowser.Controller.Dto.DtoOptions)

* When there is more than 1 person with the same name in the library only 1 is returned

Edited by h.buckle
Link to comment
Share on other sites

In general don't use the endpoint to try and get people by name. It is only kept around as legacy for emby for wmc.

 

Use the endpoints to get the person by Id. When you pull down info for media, it will include a people list and Id for each person, so you can get the Id from there. If you truly don't have the person id, then use the search endpoint to search by name.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...