[Support] Linuxserver.io - Kodi-Headless


Recommended Posts

Yes you need MariadB docker also. You need to have a sources.xml in the user folder. You can set that up on a client box so you can use the gui and then copy it over or create it by looking at the kodi wiki for formatting.

(been a few years since I've touched this and this was off the top of my head)

Link to comment

Thanks for clarifying!

I have a mysql running - not the docker though.

I followed the instructions in the kodi wiki to set up the mysql as I already have it running with nextcloud.

Used the bind-address = 0.0.0.0 setting.

Unfortunately I can't connect to the database remotely (console login with the new user/pass is working).

I tried HeidiSQL and get "Can't connect to MySQL server(10060)".

I opened up iptables "iptables -I INPUT 1 -p tcp --dport 3306 -j ACCEPT".

I flushed iptables for testing - all nothing.

What's wrong?

Link to comment

Got it.

After I figured out, that there was no service listening on port 3306, I checked the content of

/etc/mysql/mariadb.conf.d/

and found another .cnf file.

It seems the NextCloud distro uses a different name for that config file.

After removing the bind-address setting in that file and restarting the service, the clients connect as expected.

 

I still haven't found where to fire up the scraper.

My expectation is, that the headless codi should do that job or am I wrong?

I added a sources.xml pointing to the unRAID share into the userdata folder - is that enough? o.O

 

Link to comment
4 hours ago, Fireball3 said:

Got it.

After I figured out, that there was no service listening on port 3306, I checked the content of

/etc/mysql/mariadb.conf.d/

and found another .cnf file.

It seems the NextCloud distro uses a different name for that config file.

After removing the bind-address setting in that file and restarting the service, the clients connect as expected.

 

I still haven't found where to fire up the scraper.

My expectation is, that the headless codi should do that job or am I wrong?

I added a sources.xml pointing to the unRAID share into the userdata folder - is that enough? o.O

 

 

You do the initial scan from a client. 

Link to comment

I personally had an issue way back when doing then an initial scan from a client not sure what it was but after that I never had a client do anything scanning. I think it might have been the paths being different.

I personally for that reason about and to know the headless is working, do all my scanning with the headless only.

Anyhow, you need to kick off a scan. You can set it to do it on start up. And then check the log and see if it's scanning. If is says scan finished in 0 seconds, you have a problem.

The headless kodi won't scan on its own. So you need to either trigger it with something like sonarr. Or you can use a cron job and trigger a command (don't have it off the top of my head)

Link to comment
7 hours ago, bnevets27 said:

I personally had an issue way back when doing then an initial scan from a client not sure what it was but after that I never had a client do anything scanning. I think it might have been the paths being different.

I vaguely remember having read something similar. I doubt I can find the source again.

Edit: Here it is - this thread, some posts ago...:D

Now this raises the question how to configure the scraper on the headless...:S

 

7 hours ago, bnevets27 said:

Anyhow, you need to kick off a scan. You can set it to do it on start up. And then check the log and see if it's scanning. If is says scan finished in 0 seconds, you have a problem.
The headless kodi won't scan on its own. So you need to either trigger it with something like sonarr. Or you can use a cron job and trigger a command (don't have it off the top of my head)

I don't use sonarr, but a cron job should be doable.

If you have some hints how this trigger looks like, would come in handy.

 

Although headless, the docker has a webUI at port 8080. There are lots of settings but when I changed language and things and came back, changes were discarded. Is this by design or should it work?

 

Next question is, how to set the scraper on the headless?

I used the universal movie scraper on a client and it did quite well.

But how to install the scraper plugin and configure that thing on a headless?

I will do some research on that but if you have first hand info, don't hesitate to post here.

 

I wonder if I'm the only one with this lack of info since I haven't found any comprehensive how-to

for a headless setup from a-z. o.O

Edited by Fireball3
Link to comment

The thing is that Kodi headless is a hack and not an official release, so not everything is working. The web ui have been useless for a long time and I haven't even tried to use it.

You kind of need an gui to add the scraper and yo will not get any errors popping up when running in headless. That is why you need to do the initial scan from a client. It is important that the sources.xml file is the same on all clients and the headless install.

 

I (most of linuxserver that used mysql/kodi) have moved to emby as the backend now. The biggest advantage is that you don't need to have the same kodi version on the clients. The other is that you don't need to have mysql. Another point is that you have a full working webui that you can fix any scraping mismatches.

Edited by saarg
Link to comment
5 hours ago, Fireball3 said:

I vaguely remember having read something similar. I doubt I can find the source again.

Edit: Here it is - this thread, some posts ago...:D

Now this raises the question how to configure the scraper on the headless...:S

 

I don't use sonarr, but a cron job should be doable.

If you have some hints how this trigger looks like, would come in handy.

 

Although headless, the docker has a webUI at port 8080. There are lots of settings but when I changed language and things and came back, changes were discarded. Is this by design or should it work?

 

Next question is, how to set the scraper on the headless?

I used the universal movie scraper on a client and it did quite well.

But how to install the scraper plugin and configure that thing on a headless?

I will do some research on that but if you have first hand info, don't hesitate to post here.

 

I wonder if I'm the only one with this lack of info since I haven't found any comprehensive how-to

for a headless setup from a-z. o.O

Update command

curl --silent -H "Content-Type: application/json" -u user:pass -d '{"jsonrpc":"2.0","method":"VideoLibrary.Scan","id":"scan"}' http://192.111.1.111:8080/jsonrpc &> /dev/null

Clean command

curl --silent -H "Content-Type: application/json" -u user:pass -d '{"jsonrpc":"2.0","method":"VideoLibrary.Clean","id":"scan"}' http://192.111.1.111:8080/jsonrpc &> /dev/null

Those commands were last working on krypton, haven't used kodi since (not by choice).

 

Alternatively you can add "clean after update" to the advanced settings xml. I ran mine separately for some reason.

As saarg said, the webui is broke. So put it out of your mind it exists and better still, disable it.

I only ever used the default scrappers but I did setup some of the files from a client. But after learning what was needed I mostly edited the xmls. I don't see scrapers 

 

Ah I looked into it, scrappers are in the guisettings.xml
 

    <scrapers>
        <moviesdefault default="true">metadata.themoviedb.org</moviesdefault>
        <musicvideosdefault default="true">metadata.local</musicvideosdefault>
        <tvshowsdefault default="true">metadata.tvdb.com</tvshowsdefault>
    </scrapers>


I do remember getting it to all work was a massive PITA. But once working ran flawlessly. Getting familiar with kodi's xml files is helpful.
 

 

4 hours ago, saarg said:

You kind of need an gui to add the scraper and yo will not get any errors popping up when running in headless. That is why you need to do the initial scan from a client. It is important that the sources.xml file is the same on all clients and the headless install.

 

I (most of linuxserver that used mysql/kodi) have moved to emby as the backend now. The biggest advantage is that you don't need to have the same kodi version on the clients. The other is that you don't need to have mysql. Another point is that you have a full working webui that you can fix any scraping mismatches.

 

You can do it all through xml and looking at the kodi logs. Which may or may not be more difficult, depends on the person. And from my long ago memory, you don't actually need the clients to have sources.xml if none of them are going to do any scanning. 

I know when I tried emby backend, many years ago, it required a sync operation with every client. Essentially each client has its own db, like how kodi runs out of the box. Emby just syncs all the clients with the backend. In my case, because I left all my clients off, the initial sync time took too long. It wasn't long in general but I wanted the library/recently added to be there instantly like it is when using mysql. That was my biggest gripe with it. And I think it has some other limitations but again, long ago and not sure how accurate that is anymore. And your use case could be different.

 

Link to comment
On 2/1/2019 at 12:18 PM, Fireball3 said:

The reason why I went with kodi/mysql is that I don't want to have the .nfo and album art cluttering my server shares.

Kodi keeps this kind of data in it's database. Does this also apply to Emby?

If so, I'm willing to read up Emby.

 

On 2/1/2019 at 3:56 PM, bnevets27 said:

I know when I tried emby backend, many years ago, it required a sync operation with every client. Essentially each client has its own db, like how kodi runs out of the box. Emby just syncs all the clients with the backend. In my case, because I left all my clients off, the initial sync time took too long.

@saarg

Would you mind to shed some light on the mentioned questions above?

At the moment I'm not that far into Kodi/Sql so I could still switch to something more userfriendly.

Link to comment

Might be a moot point if you leave your clients on all the time.

I've found the only real way to decide between different solutions/software is to try them. Everyone has different preferences and setups. And different combinations work better for different people.

If emby is easy to setup. Try it out. If nothing about it bothers you then stick with it.

Link to comment
13 hours ago, Fireball3 said:

 

@saarg

Would you mind to shed some light on the mentioned questions above?

At the moment I'm not that far into Kodi/Sql so I could still switch to something more userfriendly.

 

Emby doesn't store anything in the folder path. Everything is in the database/config. 

 

I'm using the emby plugin and it needs to sync changes when turned on. Takes a couple of seconds on my rpi3 if there are some changes. If you only turn in the client once a month and add alot of movies/tv in that time, it will take time. 

 

I think maybe embycon plugin might be faster, but not sure as I haven't tried it. 

Link to comment
On ‎2‎/‎3‎/‎2019 at 2:44 AM, bnevets27 said:

Might be a moot point if you leave your clients on all the time.

Of course they aren't. Not even the server is up 24/7, that's why I run the database on the bananaPi.

20 hours ago, saarg said:

Emby doesn't store anything in the folder path. Everything is in the database/config. 

I'm using the emby plugin and it needs to sync changes when turned on. Takes a couple of seconds on my rpi3 if there are some changes. If you only turn in the client once a month and add alot of movies/tv in that time, it will take time.

Thanks for your feedback!

I pulled the armv7 docker and fiddled around with it. The management of the server is pretty nice.

Had trouble to link to the server via the EmbyCon plugin but the "Emby for Kodi" plugin worked right away.

I let it scrape the Movies - OK.

Set up a second library for shows but that is not showing up...guess I have to sign up on the emby forums.

Thanks for pointing me into this direction! Emby looks more promising than the Kodi/MySQL combo.

Link to comment



Of course they aren't. Not even the server is up 24/7, that's why I run the database on the bananaPi.


Not sure why this is "of course they aren't" I think the majority of users here leave their unraid server on 24/7. I have a setup at one location that uses raspberry PI's for all of the clients (running kodi) and unraid running as the server. Since the server is in charge of recording live TV it's on all the time. And the minor power draw the PI's use I don't bother to sleep/turn them off.

In a different setup/location I was using a more power hungry client(s) and would sleep them. So the syncing was an issue for me at that time.


Glad you might have found a happy solution with emby though.
  • Like 1
Link to comment
  • 1 month later...

While it seemed the answer to everything... it doesn't appear to be stable. running it as a plain docker it just runs for a bit then exists for no apparent reason.

Running as a unraid docker, it randomly shuts down also.

 

Tried running emby, but it seems to have random shutdowns also under load and has too many quirks in the way it works I don't like.

 

So now I'm running kodi 18.1 in a Virtualbox Ubuntu session.. that seems to work really well.  So next step is to get a raspberri pi to run kodi and do the updates.

 

Link to comment

Any reason why the exportlibrary function doesn't export thumbnails?  

 

curl -m 60 --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Export","params": { "options": { "actorthumbs":true, "images":true ,"overwrite":true} }, "id": "mybash"}' -H 'content-type: application/json;' http://XXXXXXX:8080/jsonrpc

 

The same exact command works against a regular kodi install.  

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.