Updating XBMC database (OpenELEC)

Updating XBMC database (OpenELEC)

XBMCWhen you use XBMC as media centre, it sometimes can be useful to be able to update the XBMC database outside XBMC. XBMC uses SQLite as database which can be managed with a tool like SQLiteSpy.

But when XBMC is still running, the database will be locked and is in read-only mode. XBMC should be closed in order to be able the access the database in write mode.

In this post I will show you how  XBMC can be closed when running OpenELEC.

These are the steps to unlock the XBMC database:

  1. Get shell access to OpenELEC
  2. Because XBMC will automatically restart when it is closed, we need to disable XBMC.
    Execute the following command: touch /var/lock/xbmc.disabled
  3. Now we can stop XBMC. First we need to find the PID of XBMC by executing this command: ps | grep xbmc. Now execute the following command: kill {pid}

Now XBMC is closed and the database is fully accessable. You can find the database(s) here: \\openelec\Userdata\Database (*.db).

When you are finished updating the database, you can restart XBMC by executing the following command: rm/var/lock/xbmc.disabled. XBMC should now start automatically. If this does not happen, you should reboot OpenELEC. Just execute this command to do so: reboot -d 0.

In this XBMC wiki you can find information about the database schema.

Comments are closed.