Jump to content

ProviderIds update via API


Recommended Posts

Che8o

Hello,

I am currently trying to fix some imdb ids via the API and looked at swagger for examples. Currently I'm using the following:

 

curl 'https://emby.site/emby/Items/915098?api_key=XXXXXXXXXXXXXXXXXXX'-H 'accept: */*'  -H 'Content-Type: application/json' --data-binary $'{ "ProviderIds": { "additionalProp1": "Imdb=tt7342838",\n  },\n}' --compressed

 

Doing this I run into the following error:

Object reference not set to an instance of an object.

 

Any idea how I correctly use the ItemUpdater here?
Thanks!

Link to post
Share on other sites
Luke

Hi there, you'd have to mimic what the metadata editor does, which means pulling down the whole item record, changing the fields you want to change, and then posting the whole object back.

Link to post
Share on other sites
Che8o

Hi there, you'd have to mimic what the metadata editor does, which means pulling down the whole item record, changing the fields you want to change, and then posting the whole object back.

ok i'll do that. thanks! in the meantime i experimented a little bit with the post request and figured this one works:

--data-binary '{"Id":"915098","Genres":[],"Tags":[],"ProviderIds":{"Imdb":"tt1399041"}}'

 

if i remove more fields ill run into this error.

Link to post
Share on other sites
Luke

Don't do that, the api is not built for incremental changes so you'll end up blanking out the rest of the data in the object.

Link to post
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...