Kodi Community Forum

Full Version: Update Library of specific profile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I have script on my server that once its sorted a new movie for example into the correct directory it fires off a kodi json rpc call to update library like below:

curl -v -H "Accept: application/json" -H "Content-type: application/json" -d '{"id":5,"jsonrpc":"2.0","method":"VideoLibrary.Scan","params":{"directory":"smb://<path_to_new_movie_dir>/"}}' http://username:[email protected]_url:80/jsonrpc

The problem is I now have a second kids profile with its own separate mysql library DB and seperate samba shares. When a kids movie is sorted I would like to do the above call specifically for the Kids profile library and for the rest do a call to update the Master profiles library. Is there a way to specific in the json rpc call which profiles library to update?

that's fundamentally not possible due to the way profiles work in core. you have to load each profile, then scan, there's sadly not a way around it.
Ah thats a shame, thanks for the reply however. Are you aware of anyone creating a standalone script to directly update a kodi library in the DB? If not I might look a setting up a headless kodi instance on the actual server and just having it handle the scanning. Thanks again