Jump to content

Can't update Metadata with API


Keo

Recommended Posts

Can someone tell me what I am doing wrong here?  I am trying to update movie metadata using the ItemUpdateService API.  When ever I execute this in swagger I get the following error:

Value cannot be null.
Parameter name: source

I've looked over all of the fields and the examples supplied in swagger, but I do not see a source parameter.  Can someone explain to me what I am doing wrong?

Link to comment
Share on other sites

Can you provide a complete example? thanks.

 

So I have this metadata:

 

 

{
  "Items": [
    {
      "Name": "Alien3",
      "ServerId": "Redacted",
      "Id": "9726",
      "IsFolder": false,
      "Type": "Movie",
      "Tags": [],
      "ImageTags": {},
      "BackdropImageTags": [],
      "MediaType": "Video"
    }
  ],
  "TotalRecordCount": 1
}

and I want to add a Tag.

 

So I've tried this:

 

post-386203-0-61480500-1546116318_thumb.png

 

and this is what it returns:

 

post-386203-0-30082000-1546116011_thumb.png

 

Edited by Keo
Link to comment
Share on other sites

So this api was designed for the metadata editor in the web interface. You will need to mimic it's behavior. That means you have to first pull down the item to obtain the complete record, then edit the fields you want to change, then post the changes by sending back the complete item.

 

I would like to add the ability to only send changed fields in the future, but we don't have that right now. Thanks.

Link to comment
Share on other sites

So this api was designed for the metadata editor in the web interface. You will need to mimic it's behavior. That means you have to first pull down the item to obtain the complete record, then edit the fields you want to change, then post the changes by sending back the complete item.

 

I would like to add the ability to only send changed fields in the future, but we don't have that right now. Thanks.

 

 

Ok.  I've been trying to find a way to get the entire record, but the only way I can find to pull back more data is to add additional fields to the query.  Is there a better endpoint to use?

Link to comment
Share on other sites

PenkethBoy

to "get" the full record

 

.../emby/users/<user id>/items/<item id>?api_key=<api access token>

 

modify what you need

 

then "post" the full record back in json format

  • Thanks 1
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...