Japes Posted December 30, 2015 Share Posted December 30, 2015 I have been running XBMC/Kodi for years now but really would like to switch to a central database. I was wondering: is there a tutorial for this apart from the official Kodi documentation that you would suggest to read? Also, is there a MYSQL or MariaDB already included in this docker? Thanks! I'd like to be pointed in the direction of something like this as well. Quote Link to comment
Living Legend Posted December 30, 2015 Share Posted December 30, 2015 My sig has a tutorial I made a longgggg ways back, but some is still relevant. I'd ignore at least the first 3 steps and go straight to 4 or 5. Kodi-Headless isn't about centralizing a database. It's more to have an instance of Kodi running 24/7 so that updates can happen fluidly and allow your client devices to be up to date the moment they're powered on. It depends on your experience with this stuff to know how simple or detailed things needs to be explained. I'll start with a very simple explanation of how to centralize your libraries across devices. 1. Install an instance of the mariaDB docker. 2. Log in to your server using something like HeidiSQL to access your databases. Create a user/pass combo which you will use in your advancedsettings.xml file. 3. Copy the template advancedsettings.xml file on the Kodi wiki. You'll just need this part of it: <advancedsettings> <videodatabase> <type>mysql</type> <host>"YOUR UNRAID SERVER IP ADDRESS</host> <port>3306</port> <user>YOUR USERNAME</user> <pass>YOUR PASSWORD</pass> </videodatabase> <musicdatabase> <type>mysql</type> <host>YOUR UNRAID SERVER IP ADDRESS</host> <port>3306</port> <user>YOUR USERNAME</user> <pass>YOUR PASSWORD</pass> </musicdatabase> </advancedsettings> This advancedsettings.xml file needs to be placed in the userdata folder of all client devices looking to read off of the server's database. 4. Start up an instance of Kodi, add your sources and update your library. At this point, as the library is updated, the database is written to a centralized location, your unRAID server. Now, anytime a client device logs in, as long as the advancedsettings.xml file was done properly, rather than look locally, it was be routed to the centralize database. Obviously this is a super abridged version that would need much greater clarification for someone with little experience with this stuff. Maybe in the coming weeks I'll try and find time to make some sort of video showing and explaining from start to finish how to get something like this going. ******************* On a side note, if any of the pros get a shot to look at my post a few back, I still have a few questions: Question #1 - If it is important to make sure that all library scans/updates are done through the same client (Kodi-Headless), what's the optimal way to make changes to the library, such as changing which artwork you would like to appear for certain movies? Since there is no GUI do I have to do this directly in the db? Can I do it on another client device without everything burning in an eternal grease fire? Question #2 - I'm also having a random issue with Couch Potato and Kodi. I can send a notification for a full system scan, but when I ask to just scan the specific folder of the new movie, CP says it does, but Kodi never seems to get the message. Couch Potato Log Excerpt: [o.core.notifications.xbmc] Sending request to 192.168.1.3:8080: [{"jsonrpc": "2.0", "params": {"message": "Downloaded ****", "image": "https://raw.github.com/RuudBurger/CouchPotatoServer/master/couchpotato/static/images/notify.couch.small.png", "title": "CouchPotato"}, "method": "GUI.ShowNotification", "id": "GUI.ShowNotification"}, {"jsonrpc": "2.0", "params": {"directory": "/movies/****"}, "method": "VideoLibrary.Scan", "id": "VideoLibrary.Scan"}] [o.core.notifications.xbmc] Returned from request 192.168.1.3:8080: [{u'jsonrpc': u'2.0', u'id': u'GUI.ShowNotification', u'result': u'OK'}, {u'jsonrpc': u'2.0', u'id': u'VideoLibrary.Scan', u'result': u'OK'}] I thought I had the answered solved when I realized I had never mapped /movies in the container to my movie folder on the server, but this didn't solve the problem. As I mentioned, the Kodi log doesn't even have a line for this scan request. However, if I change to perform a full scan, I receive the same as above except Kodi actually runs the scan and it is shown in the Kodi log. EDIT 2: After turning on debugging, I get this message when trying to only scan specific folders: 02:20:24 T:46959299913472 DEBUG: webserver: request received for /jsonrpc 02:20:24 T:46959299913472 DEBUG: JSONRPC: Value does not match any of the enum values in type 02:20:24 T:46959091689216 NOTICE: Thread JobWorker start, auto delete: true 02:20:24 T:46959091689216 NOTICE: VideoInfoScanner: Starting scan .. 02:20:24 T:46959091689216 DEBUG: CAnnouncementManager - Announcement: OnScanStarted from xbmc 02:20:24 T:46959091689216 NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:00 1 Quote Link to comment
Squid Posted December 30, 2015 Share Posted December 30, 2015 Question #1 - If it is important to make sure that all library scans/updates are done through the same client (Kodi-Headless), what's the optimal way to make changes to the library, such as changing which artwork you would like to appear for certain movies? Since there is no GUI do I have to do this directly in the db? Can I do it on another client device without everything burning in an eternal grease fire? You CAN have any library scans, etc done through other systems. What you need to make sure of however, is that the same sources.xml, passwords.xml and some other xml file I can't recall off the top of my head are all in your userdata folder on all the systems. Never had a problem at all doing this. Quote Link to comment
Living Legend Posted December 30, 2015 Share Posted December 30, 2015 ANd what about that Couch Potato error? Does that have something to do with the Kodi-Headless mapping? If I say to scan entire library it works, but when I notify to scan a specific directory to save time, nothing happens... Quote Link to comment
Japes Posted December 31, 2015 Share Posted December 31, 2015 My sig has a tutorial I made a longgggg ways back, but some is still relevant. I'd ignore at least the first 3 steps and go straight to 4 or 5. Kodi-Headless isn't about centralizing a database. It's more to have an instance of Kodi running 24/7 so that updates can happen fluidly and allow your client devices to be up to date the moment they're powered on. It depends on your experience with this stuff to know how simple or detailed things needs to be explained. I'll start with a very simple explanation of how to centralize your libraries across devices. 1. Install an instance of the mariaDB docker. 2. Log in to your server using something like HeidiSQL to access your databases. Create a user/pass combo which you will use in your advancedsettings.xml file. 3. Copy the template advancedsettings.xml file on the Kodi wiki. You'll just need this part of it: <advancedsettings> <videodatabase> <type>mysql</type> <host>"YOUR UNRAID SERVER IP ADDRESS</host> <port>3306</port> <user>YOUR USERNAME</user> <pass>YOUR PASSWORD</pass> </videodatabase> <musicdatabase> <type>mysql</type> <host>YOUR UNRAID SERVER IP ADDRESS</host> <port>3306</port> <user>YOUR USERNAME</user> <pass>YOUR PASSWORD</pass> </musicdatabase> </advancedsettings> This advancedsettings.xml file needs to be placed in the userdata folder of all client devices looking to read off of the server's database. 4. Start up an instance of Kodi, add your sources and update your library. At this point, as the library is updated, the database is written to a centralized location, your unRAID server. Now, anytime a client device logs in, as long as the advancedsettings.xml file was done properly, rather than look locally, it was be routed to the centralize database. Obviously this is a super abridged version that would need much greater clarification for someone with little experience with this stuff. Maybe in the coming weeks I'll try and find time to make some sort of video showing and explaining from start to finish how to get something like this going. The tutorial in your signature is what I used a few years ago when I first dabbled into this idea of linking my kodi. But I wasn't sure how to link this with that. "2. Log in to your server using something like HeidiSQL to access your databases. Create a user/pass combo which you will use in your advancedsettings.xml file." I think that is what I was missing out on so hopefully this will do it. I'll let you know. Thanks. Quote Link to comment
Japes Posted December 31, 2015 Share Posted December 31, 2015 Now I'm frustrated... I believe I have done everything here including reinstalling kodi on the client side. However when I go into the client side kodi to do initial scan I add the source and it asked if I wanted to scan I said yes and then nothing... log file...the AS.xml is in there as well. kodi.log.txt Quote Link to comment
j0nnymoe Posted December 31, 2015 Share Posted December 31, 2015 Now I'm frustrated... I believe I have done everything here including reinstalling kodi on the client side. However when I go into the client side kodi to do initial scan I add the source and it asked if I wanted to scan I said yes and then nothing... log file...the AS.xml is in there as well. First make sure the kodi clients are connecting to the sql server (assuming the sql server currently has no databases in it) as once a client connects, it will try to find the videos/music dbs and if they don't exist they will get created Quote Link to comment
Japes Posted December 31, 2015 Share Posted December 31, 2015 Now I'm frustrated... I believe I have done everything here including reinstalling kodi on the client side. However when I go into the client side kodi to do initial scan I add the source and it asked if I wanted to scan I said yes and then nothing... log file...the AS.xml is in there as well. First make sure the kodi clients are connecting to the sql server (assuming the sql server currently has no databases in it) as once a client connects, it will try to find the videos/music dbs and if they don't exist they will get created If you look at the log file I attached I believe that's my issue I just don't know why it can't create the database. I went into the docker tab and installed kodi headless I did the same for Mariadb I downloaded Heidisql tool and created a user kodi password kodi and set to everywhere. I checked the dashboard and both were running. I edited the advancedsettings.xml to point to the correct ip with kodi/kodi login info. I installed latest kodi on my computer and copied the advancedsettings from server to the portabledata/userdata folder and set up sources and tried to scan But nothing gets scanned in. I can go into video/files and play a file but nothing is in the library and the log says it could not connect. Quote Link to comment
j0nnymoe Posted December 31, 2015 Share Posted December 31, 2015 try connecting to your mariadb with heidiSQL client using the username/password you setup for kodi to use. I believe you just haven't configured mariadb correctly. When you connect to mariaDB with heidiSQL, you will see this: https://hostr.co/WNCAPINadp5n and if you see those databases, kodi is communicating with mariadb correctly. Also, you don't need to copy the whole advancedsettings.xml file from the kodi-headless instance, the only bits you need for each client are: <advancedsettings> <videodatabase> <type>mysql</type> <!-- don't change this value --> <host>192.168.0.2</host> <!-- change this to the IP address of your mysql/mariadb server --> <port>3306</port> <!-- change this to the port of your mysql/mariadb server --> <user>kodi</user> <!-- change this to the user for your database, not root --> <pass>kodi</pass> <!-- change this to the password for your database --> </videodatabase> <musicdatabase> <type>mysql</type> <!-- don't change this value --> <host>192.168.0.2</host> <!-- change this to the IP address of your mysql/mariadb server --> <port>3306</port> <!-- change this to the port of your mysql/mariadb server --> <user>kodi</user> <!-- change this to the user for your database, not root --> <pass>kodi</pass> <!-- change this to the password for your database --> </musicdatabase> <videolibrary> <importwatchedstate>true</importwatchedstate> <importresumepoint>true</importresumepoint> </videolibrary> </advancedsettings> Quote Link to comment
Japes Posted December 31, 2015 Share Posted December 31, 2015 try connecting to your mariadb with heidiSQL client using the username/password you setup for kodi to use. I believe you just haven't configured mariadb correctly. When you connect to mariaDB with heidiSQL, you will see this: https://hostr.co/WNCAPINadp5n and if you see those databases, kodi is communicating with mariadb correctly. Also, you don't need to copy the whole advancedsettings.xml file from the kodi-headless instance, the only bits you need for each client are: <advancedsettings> <videodatabase> <type>mysql</type> <!-- don't change this value --> <host>192.168.0.2</host> <!-- change this to the IP address of your mysql/mariadb server --> <port>3306</port> <!-- change this to the port of your mysql/mariadb server --> <user>kodi</user> <!-- change this to the user for your database, not root --> <pass>kodi</pass> <!-- change this to the password for your database --> </videodatabase> <musicdatabase> <type>mysql</type> <!-- don't change this value --> <host>192.168.0.2</host> <!-- change this to the IP address of your mysql/mariadb server --> <port>3306</port> <!-- change this to the port of your mysql/mariadb server --> <user>kodi</user> <!-- change this to the user for your database, not root --> <pass>kodi</pass> <!-- change this to the password for your database --> </musicdatabase> <videolibrary> <importwatchedstate>true</importwatchedstate> <importresumepoint>true</importresumepoint> </videolibrary> </advancedsettings> This was helpful thanks. When I login I only see the last three items in your screen shot so I think I must have set up Mariadb wrong. Any suggestions from here. Should I just start over and re install Mariadb? Quote Link to comment
j0nnymoe Posted December 31, 2015 Share Posted December 31, 2015 try connecting to your mariadb with heidiSQL client using the username/password you setup for kodi to use. I believe you just haven't configured mariadb correctly. When you connect to mariaDB with heidiSQL, you will see this: https://hostr.co/WNCAPINadp5n and if you see those databases, kodi is communicating with mariadb correctly. Also, you don't need to copy the whole advancedsettings.xml file from the kodi-headless instance, the only bits you need for each client are: <advancedsettings> <videodatabase> <type>mysql</type> <!-- don't change this value --> <host>192.168.0.2</host> <!-- change this to the IP address of your mysql/mariadb server --> <port>3306</port> <!-- change this to the port of your mysql/mariadb server --> <user>kodi</user> <!-- change this to the user for your database, not root --> <pass>kodi</pass> <!-- change this to the password for your database --> </videodatabase> <musicdatabase> <type>mysql</type> <!-- don't change this value --> <host>192.168.0.2</host> <!-- change this to the IP address of your mysql/mariadb server --> <port>3306</port> <!-- change this to the port of your mysql/mariadb server --> <user>kodi</user> <!-- change this to the user for your database, not root --> <pass>kodi</pass> <!-- change this to the password for your database --> </musicdatabase> <videolibrary> <importwatchedstate>true</importwatchedstate> <importresumepoint>true</importresumepoint> </videolibrary> </advancedsettings> This was helpful thanks. When I login I only see the last three items in your screen shot so I think I must have set up Mariadb wrong. Any suggestions from here. Should I just start over and re install Mariadb? No need to be drastic and starting over again, did you test the login you create for kodi? I personally believe you just need to make sure you have created the user correctly and it should work. Quote Link to comment
Japes Posted December 31, 2015 Share Posted December 31, 2015 try connecting to your mariadb with heidiSQL client using the username/password you setup for kodi to use. I believe you just haven't configured mariadb correctly. When you connect to mariaDB with heidiSQL, you will see this: https://hostr.co/WNCAPINadp5n and if you see those databases, kodi is communicating with mariadb correctly. Also, you don't need to copy the whole advancedsettings.xml file from the kodi-headless instance, the only bits you need for each client are: <advancedsettings> <videodatabase> <type>mysql</type> <!-- don't change this value --> <host>192.168.0.2</host> <!-- change this to the IP address of your mysql/mariadb server --> <port>3306</port> <!-- change this to the port of your mysql/mariadb server --> <user>kodi</user> <!-- change this to the user for your database, not root --> <pass>kodi</pass> <!-- change this to the password for your database --> </videodatabase> <musicdatabase> <type>mysql</type> <!-- don't change this value --> <host>192.168.0.2</host> <!-- change this to the IP address of your mysql/mariadb server --> <port>3306</port> <!-- change this to the port of your mysql/mariadb server --> <user>kodi</user> <!-- change this to the user for your database, not root --> <pass>kodi</pass> <!-- change this to the password for your database --> </musicdatabase> <videolibrary> <importwatchedstate>true</importwatchedstate> <importresumepoint>true</importresumepoint> </videolibrary> </advancedsettings> This was helpful thanks. When I login I only see the last three items in your screen shot so I think I must have set up Mariadb wrong. Any suggestions from here. Should I just start over and re install Mariadb? No need to be drastic and starting over again, did you test the login you create for kodi? I personally believe you just need to make sure you have created the user correctly and it should work. I went back into manage users and changed the password, updated both advancedsettings.xml and it looks like it's working. Scanning in everything now. The only error is with the musicdb but I haven't added any yet so I'll worry about that later. After its finished scanning I need to advancedsettings and sources.xml to my next computer and if I understand this it should just start up with the full library from now on? Thanks for your patients and help. Not sure what happened with the login but it appears changing the password worked. I originally had login/pass as kodi/kodi and changed it to kodi/xbmc so not sure if having the same for both was an issue or if I just had a typo. Quote Link to comment
squirrellydw Posted January 9, 2016 Share Posted January 9, 2016 Might be a dumb question but any issue having Kodi and Plex installed on the same machine? I currently use PLEX but thinking of trying out Kodi. I really like the BEAST addon Quote Link to comment
Squid Posted January 9, 2016 Share Posted January 9, 2016 Might be a dumb question but any issue having Kodi and Plex installed on the same machine? I currently use PLEX but thinking of trying out Kodi. I really like the BEAST addon Works perfectly Quote Link to comment
CHBMB Posted January 9, 2016 Share Posted January 9, 2016 No issues, I've got Kodi (For LAN use), Plex (For remote use), Emby (Just because) Quote Link to comment
squirrellydw Posted January 9, 2016 Share Posted January 9, 2016 awesome thanks guys. Anyone install the Beast addon, how well does it work for Live TV and Sports? Quote Link to comment
squirrellydw Posted January 9, 2016 Share Posted January 9, 2016 one more question. Once I install this do I also need to install anything on the computer that is hooked up to my TV? I know with Plex I have the server version installed on unraid and the player on my mac mini. Is this how KODI works? Quote Link to comment
Squid Posted January 9, 2016 Share Posted January 9, 2016 one more question. Once I install this do I also need to install anything on the computer that is hooked up to my TV? I know with Plex I have the server version installed on unraid and the player on my mac mini. Is this how KODI works? Yes. And you'll be happier with Kodi or OpenElec running on your HTPC rather than Plex. The only thing Kodi Headless actually does is do background updates of the library. It doesn't actually "serve" anything at all. Kodi installed on an HTPC directly plays all media and doesn't require a server per se (other than a file server) Quote Link to comment
CHBMB Posted January 9, 2016 Share Posted January 9, 2016 Plex is a Server ===> Client setup Kodi just has instances, traditionally each Kodi machine has it's own database, which is standalone. This container enables you to use a centralised MariaDB/MySQL database and update it without any of your Kodi machines being turned on. So when you do turn them on, they're all up to date. If you are just curious about Kodi, then install it on another machine and check it out before setting this up tbh. Quote Link to comment
Squid Posted January 9, 2016 Share Posted January 9, 2016 If you are just curious about Kodi, then install it on another machine and check it out before setting this up tbh. Or just ask sparklyballs to iterate the differences between them. I know that he can be quite vocal on it. IMHO the ONLY time Plex should be used (if your HTPC's are all computers) is for mobile use (tablet / phone). On a HTPC you're just shooting yourself in the foot if you use Plex instead of Kodi / OpenElec Quote Link to comment
CHBMB Posted January 9, 2016 Share Posted January 9, 2016 If you are just curious about Kodi, then install it on another machine and check it out before setting this up tbh. Or just ask sparklyballs to iterate the differences between them. I know that he can be quite vocal on it. IMHO the ONLY time Plex should be used (if your HTPC's are all computers) is for mobile use (tablet / phone). On a HTPC you're just shooting yourself in the foot if you use Plex instead of Kodi / OpenElec I agree, I have Plex, but purely for mobile use or for my parents to remotely access my library. Emby may be a replacement for both Kodi and Plex one day, but that day isn't yet.... Quote Link to comment
squirrellydw Posted January 9, 2016 Share Posted January 9, 2016 I share my media with friends and family that's what I like about Plex. Quote Link to comment
CHBMB Posted January 9, 2016 Share Posted January 9, 2016 And it's great for that. But Kodi is way better imho for your own home. Openelec is fantastic, which turns a computer into a dedicated appliance like Kodi machine. Quote Link to comment
squirrellydw Posted January 9, 2016 Share Posted January 9, 2016 What is openelec and how does it make kodi better. Quote Link to comment
Squid Posted January 9, 2016 Share Posted January 9, 2016 What is openelec and how does it make kodi better. OpenElec IS kodi preinstalled on a stripped down linux distro designed specifically for HTPCs http://openelec.tv/ Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.