[Support] Linuxserver.io - Kodi-Headless


Recommended Posts

Here are the notes I have from my last install from scratch.. I may have missed a step but I'm pretty sure it's mostly accurate . YMMV
 

Create a user on your DB server (MariaDB in my case so it's port 3307)

Add the DB section in advanced.xml

 

    <videodatabase>
        <type>mysql</type>
        <host>10.0.0.20</host>
        <port>3307</port>
        <user>kodiuser</user>
        <pass>kodipassword</pass>
    </videodatabase>

 

 

 

Change 10.0.0.20 to match your IP Address

Change /volume1/data/kodi-headless-linuxserverio to match your path

 

Run this from your NAS

sudo docker create --name=kodi-headless-186 -v /volume1/data/kodi-headless-linuxserverio/:/config/.kodi -e PGID=0 -e PUID=0 -e TZ=America/New_York -p 8089:8080 -p 9777:9777/udp linuxserver/kodi-headless:186

 

Set to Always restart

Start container

Let database build up

confirm login via   http://10.0.0.20:8089/#settings/addons

and

ensure tvdb.com metadata.tvdb.com is installed and addon is enabled in 

stop container

edit sources on kodi client to TV Shows / The TVDB  (don’t refresh)

edit sources on kodi client to Movies / Movie Database  (don’t refresh)

 

ensure path in db is set

start container

disable (debug) logging   http://10.0.0.20:8089/#settings/kodi/system

view logs

run library scan

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type:application/json;' http://kodi:[email protected]:8089/jsonrpc

 

You should see the scan results in the logs

tail -444f /volume1/data/kodi-headless-linuxserverio/temp/kodi.log

Edited by surge919
  • Like 1
Link to comment

This has been working fine for me from the first release.  A few re-installs or rebuilds when some of things happened but each time it's pretty straight foward.

 

What's important is that you run the first library scan from a pc that has a kodi client install that also uses the MySQL backend. In fact, after creating the DB, it might be easier to confifure everything on a PC and get the client working there.  Then you know your settings, paths etc work.  The headless kodi is just another kodi client but running on a server.  The config to use MySql is the same.

 

It's worth the effort of getting it working

  • Like 1
Link to comment
  • 3 weeks later...

so does this basically track your watched status and instead of having your db's on all clients you only have it on the server?

 

I use trakt to backup my watched status and it syncs between my clients and jellyfin docker.

 

question then remains: should I still install this? I think I see the benefits but this is not well documented in a tutorial as far as I could find so is it worth the hassle.

 

edit: one of my kodi clients is a vero 4k+ running OSMC so I dont know if that complicates things.

Edited by BelgarionNL
Link to comment
  • 2 weeks later...

Trying to give this a shot again but having no luck. I followed the kodi docs to a T. But when I do a database count on the video database (myvideos.116) it returns 0. Even though I know the kodi web gui is useless, if I click the browse tab I see my content there. I setup both radarr/sonarr to update the library on a new download but nothing updated. Had two episodes grabbed last night but still nothing in Kodi.

Link to comment
Not much help as I don't recall the exact steps I took, but to get my mariaDB to populate/update, I had to open it in Windows using MySQL Workbench and possibly play around with it in there
I just used a fresh install of Kodi on my windows pc and after scanning the library it populated in the headless server. My concern is that the server won't actually update the library when sonarr/radarr says to. I guess we'll see. But I figured I wouldnt need anither client for an initial scan which makes me think it may not still be setup properly.

Sent from my Mi 9T using Tapatalk

Link to comment

Yes, via the command line:

 

Update:

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://username:[email protected]:8081/jsonrpc

 

Clean:

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' http://username:[email protected]:8081/jsonrpc
 

Link to comment
1 minute ago, allanp81 said:

Yes, via the command line:

 

Update:

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://username:[email protected]:8081/jsonrpc

 

Clean:

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' http://username:[email protected]:8081/jsonrpc
 

Sweet but I actually came across a new issue. I noticed there is no TvDb scrapper. I dont know why all the new kodi versions dont have it included but using imbd leaves out a lot of my shows. I have to do it on a windows version of kodi just to get it to add the new added episodes.

Link to comment

Ya, I just cant get it to update the library consistently. I have setup radarr/sonarr to trigger update and clean and even though the logs show its scanning, nothing gets added. But it works when using a windows kodi client. This is very odd.  Logs shows this

 

2019-09-26 03:00:30.422 T:23410259937024  NOTICE: VideoInfoScanner: Starting scan ..
2019-09-26 03:00:30.487 T:23410310465280 WARNING: CActiveAE::StateMachine - signal: 22 from port: timer not handled for state: 1
2019-09-26 03:00:36.104 T:23410259937024 WARNING: Previous line repeats 5 times.
2019-09-26 03:00:36.104 T:23410259937024 WARNING: Process directory 'nfs://192.168.0.50/mnt/user/media/Tv Shows/Mike/' does not exist - skipping scan.
2019-09-26 03:00:36.105 T:23410259937024 WARNING: Process directory 'nfs://192.168.0.50/mnt/user/media/Tv Shows/Sandra/' does not exist - skipping scan.
2019-09-26 03:00:36.105 T:23410259937024  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:05
2019-09-26 03:00:36.488 T:23410310465280 WARNING: CActiveAE::StateMachine - signal: 22 from port: timer not handled for state: 1
2019-09-26 03:02:07.925 T:23410755302400 WARNING: Previous line repeats 91 times.
2019-09-26 03:02:07.925 T:23410755302400  NOTICE: NFS is idle. Closing the remaining connections.
2019-09-26 03:02:08.503 T:23410310465280 WARNING: CActiveAE::StateMachine - signal: 22 from port: timer not handled for state: 1

Those two folder paths I deleted and need to get rid of them in the db eventually.

Edited by mkono87
Link to comment
7 hours ago, allanp81 said:

Does your kodi headless have access to that nfs path? And you've added the sources.xml etc?

Yes it can access it. The share is 100% public on my network. Yep after I did the initial scan on a client I copied over the sources.xml. For now im using my nvidia shield that sonarr/radarr can call to update and its working perfectly. But I rather use this headless.

Link to comment
5 minutes ago, Squid said:

What indexer did you use?  The built-in one with Kodi, or did you select a different one.  Headless will only work with the default indexer

I used the TVdb scraper as I had problems with tmdb and tv shows for a while on any client. It would hardly ever successfully scrape any new episodes. On initial scan, it would leave out multiple shows from my library. I did try copying the metadata.tvdb folder and change the default setting in guisettings.xml

Edited by mkono87
Link to comment

So i finally nuked everything and started over and got it working. My only problem is trying to set it up in a way for different watch statuses for each of the 2 people in my house. I myself, use 3 clients and the other uses 2. I checked the kodi docs over and over and tried to get it working with the <name> tag but its just not working properly. Im starting to think maybe just having two kodi-headless instances would make this much simpler? Does anyone do this? Is it possible to change the 9077 port as well?

Link to comment

so I got this all to work but then I ran into a problem with some shows not being recognized! for those that are interested:

 

https://forum.kodi.tv/showthread.php?tid=344420&pid=2859590#pid2859590

 

it boils down to too much artwork and mariadb craps out...

 

so some shows werent scraping because in the logs it could not recognize the show so then I swapped scrapers for first time searching on a windows machine as suggested. Then game of thrones was recognized so I am at a loss...

 

I also dont know how to change default tv show scrapers on the headless since I nice thorough guide on the first page is lacking :(

 

edit nvm I also have a jellyfin server so I just installed the jellyfin official addon in kodi and bobs your uncle.

Edited by BelgarionNL
Link to comment
  • 2 months later...

Dumb question time:

 

I'm seeing "lost websocket connection" when I connect to the docker image via the 8080 web server and the Kodi documentation talkas about web sockets sitting on port 9090. But 9090 isn't defined in the docker image.

 

Am I missing something on web sockets for this build of Kodi (Latest available) or did I somehow goof up the docker install?

Link to comment
Dumb question time:
 
I'm seeing "lost websocket connection" when I connect to the docker image via the 8080 web server and the Kodi documentation talkas about web sockets sitting on port 9090. But 9090 isn't defined in the docker image.
 
Am I missing something on web sockets for this build of Kodi (Latest available) or did I somehow goof up the docker install?
No you're fine, the gui is useless. Really no reason to use it.

Sent from my Mi 9T using Tapatalk

Link to comment
Heh.
 
So just clean up the settings, point the server to some Samba shares, and let 'er rip? Leave everything to a client?
 
Why yes I'm a Kodi noob. Why do you ask?
Yep you edit the advanced settings.xml and put your Mariadb info in there and add a sources.xml

Sent from my Mi 9T using Tapatalk

Link to comment
  • 1 month later...

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.