Kodi config from bash
#1
Hi all. Apologies in advance if this isn't the most suitable bit of the forum. Suggestions for a better spot gratefully received.

I'm playing around with Xbian / Kodi Leia on a Pi 3B+. My objective is to make it as disposable as possible, so I'm scripting as much of the setup as I possibly can.

The general idea is to be able to re-flash the SD with a clean image of Xbain, log on, copy some scripts in from a flashdrive and run them and hey presto! Everything is set up just the way I like it.

Configuring the Xbain / OS side of this has been a doddle. All scripted and disposable. Now I'm looking for some idea how to tackle Kodi. I'm exporting and importing the media libraries between resets, so that's good, but are there any really good ways to configure Kodi from a bash script? For example, adding a media source, setting the content type and associating it with (for example) the MovieDB? Also, doing things like dropping "Music Videos" from the front menu, automating the screen calibration settings, etc?

I've had a dig around and it looks like there are only a few fairly sparse .xml's, so I'm guessing most of the config is in the database? Or I'm missing the location of a lot of the config files? Also, the only interfaces I've found so far are JSON-RPC that's a bit mind-boggling and might not do what I want to do anyway.

I'm really looking for something like a command line tool that works something like:
kodi-config -addsource /media/foo/films -content movies -scraper themoviedb
kodi-config -screencalibration -x1 5.2 -y1 3.8  -x2 -4 -y2 -3.7

Something of that nature? Or some docs for something like database stored procedures and parameters if it's something that can be set via sql.

Any help achieving my objective would be very welcome.

Hal.
Reply
#2
the 2 main config files are ~/.kodi/userdata/guisettings.xml and ~/.kodi/userdata/sources.xml
Reply
#3
(2019-05-24, 14:17)wsnipex Wrote: the 2 main config files are ~/.kodi/userdata/guisettings.xml and ~/.kodi/userdata/sources.xml

Thanks for the feedback wsnipex.

I found them, but they don't seem to reflect much of the config. I can see my sources in sources.xml, but it doesn't define the content they contain, or the associated scraper. And I didn't see anything changing in guisettings.xml that reflected items I've removed from the mail view, like Music Videos.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi config from bash0