[Support] Linuxserver.io - Kodi-Headless


Recommended Posts

I've got a dedicated HTPC with IR and a fanless case that I can turn on/off using IR running Openelec.  It boots in about 10 seconds off a SSD and connects to my centralised MariaDB on Unraid and also connects to TVHeadEnd so it provides a one stop shop link to all my media, music, and LiveTV.  The WAF is huge....  ;D

Link to comment

thanks, don't think I need openelec, I will install kodi on unraid and my mac mini and play with it.  So has anyone installed the Beast addon to kodi.  I just saw it today and looks very interesting.

 

thanks for the help guys, love the unraid community.

 

I took a look at it, from what I can tell it adds an arcade emulator and some streaming channels (that may be dubious in their origin)  It's not for me, I prefer to keep things simple.  But give it a go.

Link to comment

another question, I know there are addons that let you watch live tv and sports guessing not really legal though.  Could you configure a Kodi to connect through a VPN so your ISP doesn't know what your streaming?

I don't believe this is the place for that conversation but google is your answer ;)

Link to comment

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.

 

 

I for the life of me cannot set this up.

Here are the steps I am taking. Please let me know how I'm messing this up.......

 

First:

I installed kodi headless from linuxserver/kodi-headless (off of the Community Applications plugin).

I then installed MariaDB from linuxserver/mariadb:latest same place

 

I from there log into MariaDB from HeidiSQL. I then go to tools > User Manager > +Add > Username kodi > host (I've tried localhost and the server's IP address) > PW (twice)  > Check box next to global privileges > Save.

 

From there I go on the left-hand side and click the right arrow next to MySQL > go down to user open the data section of that field. (I see that kodi was made as a user the PW). However, the PW has changed to a long string of letters and numbers. (I assume encrypted) (will this have any effect on the password for the headless logging in or my remote machine?)

 

I then go onto my server. find the advancedsettings.xml file on the headless Kodi.

(I've used the provided version of the advancedsettings.xml and the abbreviated version just listed below.

 

I also place the exact same file (just by copying it) into the AppData of my client machine (my laptop)

 

<advancedsettings>

  <videodatabase>

      <type>mysql</type>

    <host>***.***.***.***</host>

    <port>3306</port>

    <user>kodi</user>

    <pass>****</pass>

  </videodatabase>

  <musicdatabase>

    <type>mysql</type>

    <host>***.***.***.***</host>

    <port>3306</port>

    <user>kodi</user>

    <pass>****</pass>

  </musicdatabase>

</advancedsettings>

 

From here I go onto Kodi from my laptop > Add a source > Set the content > It asks if i want to refresh information? I say Yes > NOTHING HAPPENS!

 

I'm not sure what's going on.

Nothing is being added to the library on my local machine. Also, if I add anything new to the folder selected that new information isn't added to the database either. I Personally don't think that either instance of Kodi is accessing the database. However, I'm not super knowledgeable about running any of this software at all. I just can't find anything on the internet or search function to help me out.

 

I've also tried this with sparklyballs version of a headless-kodi and mariaDB all in one with no luck either.

http://lime-technology.com/forum/index.php?topic=37209.0

 

Link to comment

What I did was setup a centralised MariaDB instance using just your laptop initially.  Get your sources and everything setup, then worry about adding in the Kodi Headless container....

 

Here's my advancedsettings.xml

<advancedsettings>

<videodatabase>
<type>mysql</type>  
<host>192.168.0.1</host>  
<port>3306</port>  
<user>kodi</user>  
<pass>kodi</pass>  
</videodatabase>

<musicdatabase>
<type>mysql</type>  
<host>192.168.0.1</host>  
<port>3306</port>  
<user>kodi</user>  
<pass>kodi</pass>  
</musicdatabase>

<videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
</videolibrary>

<network>
<buffermode>1</buffermode>
<cachemembuffersize>1073741824 </cachemembuffersize>
<readbufferfactor>20</readbufferfactor>
</network>

</advancedsettings>

 

And my sources.xml

<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>TV Series</name>
            <path pathversion="1">smb://192.168.0.1/TV Series/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Movies</name>
            <path pathversion="1">smb://192.168.0.1/Movies/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
        <source>
            <name>Music</name>
            <path pathversion="1">smb://192.168.0.1/Music/</path>
            <allowsharing>true</allowsharing>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
</sources>

 

Other than that I'm not sure what to suggest.  But concentrate on getting just MariaDB working with Kodi on your laptop for the time being...

 

The benefit of that is there are guides for this on the Kodi wiki....

 

Hope that helps

 

Link to comment

have you tested that you have setup the kodi user correctly by trying to use heidisql to login to the mariadb instance?

 

I assume to do that just instead of using root (no password) in heidisql just use the kodi login and PW?

 

I listed the steps i used to create the kodi user above. Is there another way to do that?

Link to comment

have you tested that you have setup the kodi user correctly by trying to use heidisql to login to the mariadb instance?

 

I assume to do that just instead of using root (no password) in heidisql just use the kodi login and PW?

 

I listed the steps i used to create the kodi user above. Is there another way to do that?

 

Just follow the instructions here...

Link to comment

Thank you. You're a peach!

 

Wow, this week has been special, first I get called baby and now peach.....  ;D

 

Must be doing something right then.

 

EDIT:

On that link you gave me for the setting up of the Setting up MySQL which OS would I be looking for? or is this step already accomplished through the docker app?

Link to comment

Whatever OS your laptop is running.  Like I said get that component working first then sort the container out.

 

My logic is this, at the moment you're trying to do two things simultaneously, setup centralised MariaDB and headless updating.  If you follow that guide and get your laptop working with a MariaDB held on your Unraid machine first then it makes accomplishing headless updating easy.

Link to comment

Right. That's basically what I'm trying to do is just simply get my laptop to connect to the mariadb. However, I'm not even 100% sure that I've set it up correctly. I'm not familiar with how to that.

 

I know I need to set up the username and PW on the database. I listed the steps I took to do that. (is that the correct steps?)

 

I guess my question here is once I've installed mariadb. What is the simplist way to ensure that I set up the user correctly?

 

Also, to test to see if my version of kodi on my laptop is indeed able to connect to it?

 

 

(sorry if i'm being difficult or obtuse. I've been at his for hours and its mainly due to my inexperience)

Link to comment

Well, I was the one who called you peach either way. LOL..

 

Okay, another question. So it's my understanding that if any new content is added to the source folder (where all the videos/music is held) this data will be then added the headless Kodi. That, in turn, will update any of the client machines.

 

However, when I add a new movie to the folder nothing changes on my laptop's Kodi.

 

Does the headless version of Kodi not scrape the new content (automatically)?

 

Or

 

Am i required to go into kodi and scrape the library every time i add something new so that all my client machines are up to date?

Link to comment

Well, I was the one who called you peach either way. LOL..

 

Okay, another question. So it's my understanding that if any new content is added to the source folder (where all the videos/music is held) this data will be then added the headless Kodi. That, in turn, will update any of the client machines.

 

Kind of, basically the Kodi Headless docker is like another client that is always on and updates the MariaDB database that is accessed by all the other clients...

However, when I add a new movie to the folder nothing changes on my laptop's Kodi.

 

Does the headless version of Kodi not scrape the new content (automatically)?

 

Or

 

Am i required to go into kodi and scrape the library every time i add something new so that all my client machines are up to date?

 

CP & Sonarr can trigger updates if you configure them to do so... Or I trigger updates via my Android phone using Yatse....

 

You must make sure that there is a copy of sources.xml in the userdata folder in the headless docker container.

 

 

Link to comment

Well, I was the one who called you peach either way. LOL..

 

Okay, another question. So it's my understanding that if any new content is added to the source folder (where all the videos/music is held) this data will be then added the headless Kodi. That, in turn, will update any of the client machines.

You must make sure that there is a copy of sources.xml in the userdata folder in the headless docker container.

 

Okay. Maybe I have something wrong in my headless Kodi. Like I said before I copy and pasted the advancedsetings.xml file to the headless folder > Added a movie > Restarted kodi (stopped and started the docker) > Went to my client machine (laptop) > checked for any updates...

 

Nothing.. Nothing new the movies that I'm adding are extremely short and easy to scrape.

 

Both instances are using the same advancesettings.xml and same source.xml

Link to comment

Well, I was the one who called you peach either way. LOL..

 

Okay, another question. So it's my understanding that if any new content is added to the source folder (where all the videos/music is held) this data will be then added the headless Kodi. That, in turn, will update any of the client machines.

You must make sure that there is a copy of sources.xml in the userdata folder in the headless docker container.

 

Okay. Maybe I have something wrong in my headless Kodi. Like I said before I copy and pasted the advancedsetings.xml file to the headless folder > Added a movie > Restarted kodi (stopped and started the docker) > Went to my client machine (laptop) > checked for any updates...

 

Nothing.. Nothing new the movies that I'm adding are extremely short and easy to scrape.

 

Both instances are using the same advancesettings.xml and same source.xml

 

So you've got the laptop working with MariaDB right?

 

Delete the appdata folder and delete the container and the XML.  Now reinstall it using the same username/password that you've configured for use on your laptop.  You don't need to copy advancedsettings.xml to the docker, that's created automatically.  But you should copy across sources.xml....

 

Like I said before, it doesn't scan folders but it can be used to trigger library updates..

Link to comment

Like I said before, it doesn't scan folders but it can be used to trigger library updates..

 

Okay. That makes sense. I think that's what I was looking for. However, my media manager software in the near future is said to trigger updates so once that is finished up that's what I'll be using. Man you've been a huge help.

 

Yeah. My laptop seems to be connected with maria quite well. I'm now testing everything across the network with my living room's system.

 

Once again, if I have issues I'll call back.

 

EDIT: WORKS LIKE A DREAM..

 

Just tested it. :D

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.