XBMC/KODI-Headless Docker


Recommended Posts

  • Replies 205
  • Created
  • Last Reply

Top Posters In This Topic

Is it common to use a config folder in the cache drive?

 

/mnt/cache/Config/xbmc/userdata

 

Do most dockers store locally needed data like this in "Config", and if so, does it need to be made a cache only share before you try to use it?

 

Hell, while someone is answering that question, i put my image in /mnt/cache/docker.img. Does it (by default) not move things in the root of cache?

Link to comment

Is it common to use a config folder in the cache drive?

 

/mnt/cache/Config/xbmc/userdata

 

Do most dockers store locally needed data like this in "Config", and if so, does it need to be made a cache only share before you try to use it?

 

Hell, while someone is answering that question, i put my image in /mnt/cache/docker.img. Does it (by default) not move things in the root of cache?

Not using this docker, but yes, you should make your Config share cache-only or mover will move it to the array.

 

/mnt/cache/docker.img is fine. mover only works with cache folders and their files and does not move files at the top level of cache.

Link to comment

Is it common to use a config folder in the cache drive?

 

/mnt/cache/Config/xbmc/userdata

 

Do most dockers store locally needed data like this in "Config", and if so, does it need to be made a cache only share before you try to use it?

 

Hell, while someone is answering that question, i put my image in /mnt/cache/docker.img. Does it (by default) not move things in the root of cache?

Better yet create a hidden folder something like: /mnt/cache/.config/xbmc/userdate

The period preceeding the folder name indicates a hidden folder.

 

The mover does not touch anything in a hidden folder

 

Link to comment

Why is a hidden folder better! Nothing annoys me more than hidden folders and I don't see the need.

Because unraid wont touch it at all, no chance of unraid moving any of the data or deleting it.

 

Your annoyance, or refusal to type ls -la or setting view hidden folders in Windows, might not be others.

 

I have had hidden folders on the cache drive for a while now, they're actually rather convenient.

Link to comment

Why is a hidden folder better! Nothing annoys me more than hidden folders and I don't see the need.

Because unraid wont touch it at all, no chance of unraid moving any of the data or deleting it.

 

Your annoyance, or refusal to type ls -la or setting view hidden folders in Windows, might not be others.

 

I have had hidden folders on the cache drive for a while now, they're actually rather convenient.

 

Setting view hidden is a global setting that then effects the whole desktop.  Annoying.

 

Setting a directory tree, like /apps to cache only will stop unRAID touching it if you choose to use a cache drive for its intended purpose. Many use cache drives purely as app drives so there is no moving issues.

 

But it's not only for a command line.  Trying to point an app's gui, like kodi, to a directory under a hidden share is nigh on impossible.

Link to comment

Why is a hidden folder better! Nothing annoys me more than hidden folders and I don't see the need.

Because unraid wont touch it at all, no chance of unraid moving any of the data or deleting it.

 

Your annoyance, or refusal to type ls -la or setting view hidden folders in Windows, might not be others.

 

I have had hidden folders on the cache drive for a while now, they're actually rather convenient.

 

Setting view hidden is a global setting that then effects the whole desktop.  Annoying.

 

Setting a directory tree, like /apps to cache only will stop unRAID touching it if you choose to use a cache drive for its intended purpose. Many use cache drives purely as app drives so there is no moving issues.

 

But it's not only for a command line.  Trying to point an app's gui, like kodi, to a directory under a hidden share is nigh on impossible.

Because pressing alt+v is difficult, I get it.

 

You can install apps to a cache drive, and it's not impossible to point anything to a hidden drive, in Windows your use the $ at the end of the folder name, in Linux you use a . that precedes the folder name. I have done it on Linux and Windows many times.

 

Even xbmc/kodi do it with their .xbmc or .kodi folders.

Link to comment

All extra work for no benefit. What's the point?

 

You can have a cache drive and install apps on it since most apps on Unraid run in memory. And if you make your cache drive an SSD, then you're golden.

Also including a cache drive for it's intended purposes, cachings downloads, won't make your HD stream buffer when your server downloads large content.

But I digress....

 

Back on topic, has anyone had an issue where their headless is unable to write to the music database?

It creates it but will not scan content into it?

 

I recreated the Music db by stopping the headless and punting the exisiting database, then I start the headless again, and it creates the new Musicdb.

In command line via SSH on my server I run the following command to begin a scan for Music...

curl --data-binary '{ "jsonrpc": "2.0", "method": "AudioLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://192.168.1.151:8089/jsonrpc

 

Minutes later I check the db with HeidiSQL the db is created, but it's empty.

 

Checking the XBMC log it does not indicate that a scan ever ran the last ling in the log is...

NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:46

 

Thoughts?

 

Link to comment

Don't want to drag this out any more, but I'm not sure everyone is actually aware of the cache-only feature, since i have noticed other people are still using hidden folders when it's not necessary.

 

While it is true that mover will ignore a hidden folder, mover will also ignore a share that is set to Use cache disk: Only.

 

The cache-only share feature was introduced during v5 development, and gives the advantage of having shares that are ignored by mover, but have none of the disadvantages of being hidden.

Link to comment

Don't want to drag this out any more, but I'm not sure everyone is actually aware of the cache-only feature, since i have noticed other people are still using hidden folders when it's not necessary.

 

While it is true that mover will ignore a hidden folder, mover will also ignore a share that is set to Use cache disk: Only.

 

The cache-only share feature was introduced during v5 development, and gives the advantage of having shares that are ignored by mover, but have none of the disadvantages of being hidden.

 

Sounds good.

Link to comment

nice, that worked and installed, now I just need to move ports.  My nzbget uses 8080, so I will need to change that obviously

 

that's easy enough

 

add -p <port>:8080 to the run command replacing <port> with whatever you want, you can then connect to the webserver and notfications through that port.

Oh yeah,  was thinking that but then thought the net=host command negates that. Thanks.

 

What's the best method for removing and then running the command again,  a full image removal and download or is there an easier way?

 

Now for a silly question.  When loaded,  what should I see when I browse to the url? I see the kodi logo and then like 5 menu items,  profile,  movies,  TV,  music and maybe one more.  Should I expect to see settings or anything?  I am trying to come from plex,  so my thought of what to expect on the server is from there,  but that expectation is likely way off. 

Link to comment

nice, that worked and installed, now I just need to move ports.  My nzbget uses 8080, so I will need to change that obviously

 

that's easy enough

 

add -p <port>:8080 to the run command replacing <port> with whatever you want, you can then connect to the webserver and notfications through that port.

Oh yeah,  was thinking that but then thought the net=host command negates that. Thanks.

 

What's the best method for removing and then running the command again,  a full image removal and download or is there an easier way?

 

Now for a silly question.  When loaded,  what should I see when I browse to the url? I see the kodi logo and then like 5 menu items,  profile,  movies,  TV,  music and maybe one more.  Should I expect to see settings or anything?  I am trying to come from plex,  so my thought of what to expect on the server is from there,  but that expectation is likely way off.

It's headless, so not much, the logo and the menus us a good sign. Generally a headless instance is for updating your library/sql db. This is useful for a couple reasons, one, you're able to stop and resume play in another room, two, you can have your media players(kodi/xbmc)  hit that db and when they start up their libraries week be up to date.

 

As for the command, I'm not sure.

Link to comment

OK, to make things easy, I will figure out the commands second.  First priority is the port.  While not a super huge ordeal, I can move nzbget, I thought I would revisit the port one more time.

 

sudo docker run -d --name=kodi --net=host -e MYSQLip=192.168.0.146 -e MYSQLport=3306 -e MYSQLuser=xbmc -e MYSQLpass=xbmc  --privileged -p 8084:8080 -v /appdata/kodi:/opt/kodi-server/share/kodi/portable_data sparklyballs/deb-temp-12.04

 

 

I did  -p 8084:8080

 

however, kodi is still on 8080.  If I can move it sweet, if not, I will move nzbget as noted.

 

89f13367f831        sparklyballs/deb-temp-12.04:latest  "/root/firstrun.sh"  14 minutes ago      Up 2 seconds                                kodi   

 

note that there is no port listed.  I assume this is a result of --net=host but I cannot confirm  The same goes for plex, so kodi might be stuck on 8080

 

 

The good news is that things are functioning.  I installed kodi on my windows machine, added the advanced settings file and updated the library.  Currently things are scanning and I see them in the web interface.

 

I assume that unlike plex, I am not able to manage any of this information via the web gui, is that correct?  Heck, even in the Windows UI I am not seeing much options to edit the content detected.

 

Call me a XBMC N00B, but I have no idea what to expect, but it seems xbmc relies on nfo files that I would manually create in situations that the scrape fails or has the wrong info, seems easy enough.  Regardless, things look nice so far. 

 

Link to comment

OK, to make things easy, I will figure out the commands second.  First priority is the port.  While not a super huge ordeal, I can move nzbget, I thought I would revisit the port one more time.

 

sudo docker run -d --name=kodi --net=host -e MYSQLip=192.168.0.146 -e MYSQLport=3306 -e MYSQLuser=xbmc -e MYSQLpass=xbmc  --privileged -p 8084:8080 -v /appdata/kodi:/opt/kodi-server/share/kodi/portable_data sparklyballs/deb-temp-12.04

 

 

I did  -p 8084:8080

 

however, kodi is still on 8080.  If I can move it sweet, if not, I will move nzbget as noted.

 

89f13367f831        sparklyballs/deb-temp-12.04:latest  "/root/firstrun.sh"  14 minutes ago      Up 2 seconds                                kodi   

 

note that there is no port listed.  I assume this is a result of --net=host but I cannot confirm  The same goes for plex, so kodi might be stuck on 8080

 

 

The good news is that things are functioning.  I installed kodi on my windows machine, added the advanced settings file and updated the library.  Currently things are scanning and I see them in the web interface.

 

I assume that unlike plex, I am not able to manage any of this information via the web gui, is that correct?  Heck, even in the Windows UI I am not seeing much options to edit the content detected.

 

Call me a XBMC N00B, but I have no idea what to expect, but it seems xbmc relies on nfo files that I would manually create in situations that the scrape fails or has the wrong info, seems easy enough.  Regardless, things look nice so far.

 

 

i'm not sure of the implications of host vs bridge and mapping ports as my limited experience with dockers is mostly confined to the unraid environment.

 

as far as nfo's go, for movies it's pretty straightfoward, (this only works if each movie is in a separate folder) make a file called whatever the movie is called in your filesystem changing the extension to .nfo, for instance if you have a movie called

the bridges of madison county.103242422.av

i the nfo should be called

the bridges of madison county.103242422.nfo

(it's probably not hard and fast the naming convention here, but it's the way i've always done it and it works). then in the nfo file paste the imdb link for that particular movie (including the http, and up to the end of the tt bit, leaving a trailing /) so for bridges of madison county it would be

www.imdb.com/title/tt0112579/

 

the scraper in kodi will do the rest.

Link to comment
  • 3 weeks later...

I am having problem running this docker. I pulled image directly form repository (not using command line).

 

XBMC --> XBMC 13,2 Gotham

MySQL --> MariaDB (after installing this docker I pointed data to previous mysql setup [mysql-5.5.30-i486-1gds.txz], XBMC has no problem accessing tables. By default Gotham is setup to create it's own video database "MyVideos78", but in my setup it's called "xbmc_videos78". Since it's working I did not see any reason to change it. I checked version with MySQL Workbench and it says : 5.5.37 MariaDB-0ubuntu0 14.04.1

 

So my original advancedsettings.xml file has following data:

 

<videodatabase>

        <type>mysql</type>

        <host>192.168.1.2</host>

        <port>3306</port>

        <user>xbmc</user>

        <pass>xbmc</pass>

        <name>xbmc_video78</name>

    </videodatabase>

    <musicdatabase>

        <type>mysql</type>

        <host>192.168.1.2</host>

        <port>3306</port>

        <user>xbmc</user>

        <pass>xbmc</pass>

        <name>xbmc_music46</name>

    </musicdatabase>

 

Now, I installed sparklyballs' docker from repository with following information

 

/root/.xbmc --> /mnt/cache/appdata/xbmc

8089 --> 8089

MYSQLip --> 192.168.1.2

MYSQLport --> 3306

MYSQLuser -- > xbmc

MYSQLpass -- > xbmc

 

WebUI is loading properly on http://192.168.1.2:8089/ and I can see menu in the top right corner: Profiles, Remote, Movies, TV Shows, Music. But pressing Movies or TV Shows buttons does nothing. So my guess is that headless xbmc server is not connecting to mysql database. I followed instructions regarding advancedsettings.xml that is installed with an image and it looks like this:

 

<videodatabase>

        <type>mysql</type>        <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP -->

        <host>192.168.1.2</host>  <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP -->

        <port>3306</port>          <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP -->

        <user>xbmc</user>          <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP -->

        <pass>xbmc</pass>          <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP -->

</videodatabase>

 

<musicdatabase>

        <type>mysql</type>        <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP -->

        <host>192.168.1.2</host>  <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP -->

        <port>3306</port>          <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP -->

        <user>xbmc</user>          <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP -->

        <pass>xbmc</pass>          <!-- EDIT THESE VALUES TO MATCH YOUR LOCAL SETUP -->

</musicdatabase>

 

 

As you can see it's missing both:

    <name>xbmc_video78</name>

  <name>xbmc_music46</name>

 

I edited advancedsettings.xml and added these two lines, but that did nothing and both sections in WebUI Movies and TV Shows are empty. I also copied sources.xml from original setup and again nothing happened. I tried changing user and permissions for xbmc folder in appdata and that did not work either

 

To tell the truth I do not know what else I can do to make this work? Maybe, I am doing something incorrectly. Please help

 

 

EDIT: I finally got is to work :)

 

The problem were these two lines:

<name>xbmc_video78</name>

<name>xbmc_music46</name>

 

All I had to do is to remove 78 & 46 and add these modified lines

 

<name>xbmc_video</name>

<name>xbmc_music</name>

 

server adds numbers 78 & 46 in the background (log file)

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
  • 4 weeks 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.