Jump to content

Adding a show to Favorites


BMStroh

Recommended Posts

BMStroh

Probably very basic for anyone who has done more with the API code - I'm more comfortable playing with the database via SQL queries.  I suppose I could find a way to do this directly, but figured it might be interesting to do this "right" if possible.

 

I'd like to clear out my user favorites, then add a few items.  Since I'm pulling those items from the database already, I can use whatever data fields I need when posting back to the API.  

 

How straightforward should this be?

 

Thanks!

Link to comment
Share on other sites

PenkethBoy

if doing it in the db - go to the userdatas table and set all the isFavorite fields to 0 from 1

 

in the api - bit more convoluted - but you can call using the filter IsFavorite=true

 

../emby/Users/<userid>/Items?Recursive=true&IncludeItemTypes=Movie&IsFavorite=true&api_key=<apikey>

 

need to do this for each user and then amend and post back etc etc - Note you cant just amend one element of an item you have to return the full item - partial amends are not supported via the api

 

However for what you want i would do the db edit - much quicker - but also consider amending the ratingLastModified field as well - which without testing is probably updated when the fav is changed by a user

Edited by PenkethBoy
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...