How to remotely update library?

Hello support,

is there a way how to remotely (via Putty) update the libraries in OSMC?

I found this: Commandline Reference
but it did not answer my question.

I have two account in OSMC on my RPi2:

  • parents
  • kids
    Tto separate access to movies/shows, but I use MediaElch to manage all movies/shows on the NAS, so there are all files in (parents and kids).

Question is: is there a way how to update both libraries on RPi2 once I finish updating in the MediaElch? There is setting in the MediaElch, but it is some kind of general (or how to say it), it does not divide between accounts in OSMC.
So, is there a way/command which I can run via Putty on the RPi2?

It´s not about laziness to go to living room and run “library update on RPi2”, but about … I have to login as one account, update library, logout, login as second account and run library.
As this take like 20-30mins each… I would like to run both at once remotely.

Thank you for advise.

Not via putty but just via the Kodi Webinterface. Just go to http:// and then choose remote. There you have a button to update audio and video library

Hi Fzinken,

ehm, I did set Webinterface, but I disabled it again, I did not find it to much useful.
So, I will have to re-check its features again :wink:

Thank you.

OK, I enabled the Webinterface again, set credentials…

But when I logged in I see only the movies/shows of the “parents” account, not the “kids” account.
How can I switch to the other RPi2 account? Or is it depend which account is active on RPi2?

Thank zou.

I usually use an app on my smartphone to trigger a library update. (I happen to use Yatse, but I think there are others too.)

As far as I know only the currently active profile can have a library update triggered. So what you are trying to do can’t directly be done.

Click on “Profiles” to change the account

##on remote system
sudo apt-get install kodi-eventclients-xbmc-send

switch profiles

kodi-send --host=<IP-or-hostName> --action="LoadProfile(<PROFILE-NAME>)"

update library

kodi-send --host=<IP> --action="updateLibrary(video)"

( edit: fixed pkg name in first step )

2 Likes

It does not work:

osmc@:~$sudo apt-get install kodi-send
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package kodi-send

:disappointed:

edit: ohh it seems like it is already installed:
osmc@:~$ kodi-send
xbmc-send [OPTION] --action=ACTION
Example
xbmc-send --host=192.168.0.1 --port=9777 --action=“XBMC.Quit”
Options
-?, --help Will bring up this message
–host=HOST Choose what HOST to connect to (default=localhost)
–port=PORT Choose what PORT to connect to (default=9777)
–action=ACTION Sends an action to XBMC, this option can be added multiple times to create a macro

The kodi-send event client is already included in OSMC

1 Like

So, I created two script files:

cat update-deti.sh
#!/bin/bash
kodi-send --host=192.168.x.y --action=“LoadProfile(deti)”
kodi-send --host=192.168.x.y --action=“updateLibrary(video)”

cat update-rodice.sh
#!/bin/bash
kodi-send --host=192.168.x.y --action=“LoadProfile(rodice)”
kodi-send --host=192.168.x.y --action=“updateLibrary(video)”

I have two profiles in the Kodi: deti (kids) and rodice (parents)

But when user “rodice” was logged in and I ran update for “deti” it cause the RPi2 force restart :astonished:

Any idea why?