Che8o 1 Posted March 10, 2020 Share Posted March 10, 2020 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 comment Share on other sites More sharing options...
Luke 36876 Posted March 10, 2020 Share Posted March 10, 2020 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 comment Share on other sites More sharing options...
Che8o 1 Posted March 10, 2020 Author Share Posted March 10, 2020 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 comment Share on other sites More sharing options...
Luke 36876 Posted March 10, 2020 Share Posted March 10, 2020 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 comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now