Jump to content

Failed to call the API "postItemsByItemid"


Recommended Posts

Posted (edited)

When calling the API "postItemsByItemid," an error message was returned: Value cannot be null. (Parameter 'source'), see (attachments 1~2.)

When I entered the album page, the title had already been updated, but it was updated on the album list page. (attachment 3~4)

I want to know how to solve this problem? I have consulted a lot of documents, but the source parameter is not mentioned in them.
In addition, how to resolve the inconsistency between the detail page and the list page through the API approach?
Thank you for your answer~

 

 

image.png.d2fe5c671f645fd7a72b99bd66065e99.pngimage.png.160a822bd4db6fb00b7729f0950ddee3.png

image.png.7b1f2dc927040451f99aa3c26e4bb4ef.pngimage.png.3aac41fb75a9e5bfe8ade0a5bd38c57d.png

Edited by MyFaith
  • 1 month later...
Posted (edited)

Hi, I encountered exact same error when calling postItemsByItemid API to update item's name.

The request parameters are almost exact the same as @MyFaith 's case, except I my case the library type is "Home videos & photos"

here's the corresponding part of the embyserver.txt:

2025-04-13 23:19:45.199 Info Server: http/1.1 POST http://host1:8096/emby/Items/2797. Source Ip: host5, UserAgent: Deno/2.2.1
2025-04-13 23:19:45.200 Error Server: Error processing request
*** Error Report ***
Version: 4.8.11.0
Command line: /usr/lib/emby-server/EmbyServer.dll -programdata /var/lib/emby -ffdetect /usr/bin/ffdetect-emby -ffmpeg /usr/bin/ffmpeg-emby -ffprobe /usr/bin/ffprobe-emby -restartexitcode 3
Operating system: Linux version 6.12.19-1-lts (linux-lts@archlinux) (gcc (GCC) 14.2.1 20250207, GNU ld (GNU Binutils) 2.44) #1 SMP PREEMPT_DYNAMIC Thu, 13 Mar 2025 15:2
Framework: .NET 6.0.36
OS/Process: x64/x64
Runtime: usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.36/System.Private.CoreLib.dll
Processor count: 12
Data path: /var/lib/emby
Application path: /usr/lib/emby-server
System.ArgumentNullException: System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Emby.Api.ItemUpdateService.UpdateItem(BaseItemDto request, BaseItem item)
at Emby.Api.ItemUpdateService.Post(UpdateItem request)
at Emby.Server.Implementations.Services.ServiceController.<>c__DisplayClass8_0.<VoidActionDelegate>b__0(Object service, Object request)
at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req, Type serviceType)
at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IServerApplicationHost appHost, IRequest httpReq, IResponse httpRes, IStreamHelper streamHelper, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
Source: System.Linq
TargetSite: Void ThrowArgumentNullException(System.Linq.ExceptionArgument)
2025-04-13 23:19:45.200 Info Server: http/1.1 Response 400 to host5. Time: 1ms. POST http://host1:8096/emby/Items/2797

Thank you!

Edited by ikr_7
Posted

You can't just supply a portion of an item. You have to pull the original item down first, change the fields that you want to change, and then send the whole thing back.

  • 2 weeks later...

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...