2 Problems in regards to MusicDB (with kodi-headless)
#1
Hi there.

Using the following setup:
  1. Setup Kodi on my laptop (set language to german)
  2. Set up a MysqlDB server and connected Kodi to it
  3. Added my music sources & scanned them into the DB
  4. Copied the .kodi folder to my server and setup a kodi-headless instance running in a docker container (self built linuxserver/kodi-headless to include german locale)
So far so good. The kodi-headless instance is running fine and my clients are able to connect to the MysqlDB. "All fine", but...

I'm facing 2 problems with this setup:

1.) 
If I do a DB-update on the server it scans in some albums although they were scanned in fine already an the laptop. If I do an update on the laptop afterwards, it scans in the same albums again, although multiple updates on the server did not result in anything newly scanned in. This is strictly reproduceable. So doing an update on the laptop, it scans in some already scanned albums on the first update. Any further update runs without any "mysql execute". If I then update the DB on the server, it's the same. The same albums are scanned in again on the first update, whereas any further update runs without any "new" items. So it's always the same albums that are scanned in again.
I can't seem to find any reason why some albums are always scanned in on the one side or the other. 

Question: what would be the best way to identify, why some albums are recognized as "to be scanned again", whereas the large majority gives 
Code:
DoScan Skipping dir '....' due to no change
I tried "grepping" (tail -f .kodi/temp/kodi.log | grep "Mysql execute") and searching the logs for re-scanned albums, but I can't really find the cause. I also did re-build the docker container for to have both instances (laptop & server) running on the same locale to no avail. I'm not able to identify why those albums are re-scanned ;(

2.)
Another thing I'm noticing is that if I do scan my sources on my laptop, the sourceid table on the DB is populated fine. A
Code:
SELECT * from source;
gives a table with all sources and the corresponding IDs, Name & Path.
After a library update on the server, the source table is gone!? If updating on the laptop again, the source table is populated again, but IDs change and are counted onwords. If the sources had IDs from 1-30, they afterwards have 31-60.

Anyone with ideas on that?
Reply
#2
I don't understand step 4. Why don't you just point your laptop to the MySQL database? You don't need another server.
Reply
#3
I need the kodi instance on the server for multiple reasons:
As the server is holding the media locally, DB updates are fast as not network is in between
As the server is running 24/7, I don't need any other instance to do the maintenance of updates to the DB
The main reason is, I'm able to sync Yatse with this instance and have all clients be able to be configured as "slaves" to this (fast) instance.
Yatse is able to sync one instance and base other hosts on this "central" host. Therefore Yatse needs a running instance to sync with.

Prior to this I had each client synced to yatse on its own (because of 3 profiles with 4 separate DBs, 2 music & 2 video). This setup led to problems: different profiles need different ports for yatse to be able to separate the profiles. It needed profile switching and my Handy draining as there always was a need to sync. Mostly when I wanted to use Yatse :-(
Every client had 2 profiles, making it 6 hosts on yatse to sync to, as each profile used a different combination of the 4 DBs. Together with the syncing, it needed 6 times the space for caching. The profile switching was inconvenient and not always working flawlessly.

So now I have only one instance to sync to, only one profile on every client and I'm able to simply add a temporary client to the setup which is synced real fast to yatse as it's using an already synced host.

Separation of the audio DB and main menu setup on the clients is another topic (the video DB is far easier to handle in this regard). Yatse is able to use 'sources' and filtering rules on your media making it quite easy to handle a huge DB.

But nevertheless, despite of my use case, any kodi instance connected to a Mysql DB should be able to update the DB correctly, as long as there's a correct (shared, synced, path-substitution) sources.xml.

If scanning on the one instance leads to different results than the other, it would be very helpful and interesting to know the cause! :-)

Yes, all instances share the same paths (system mounted nfs shares).
And, the laptop in step 1 is only needed to do the initial scanning as it's not possible to give kodi an empty DB and a sources.xml. It needs manual interaction to do the initial scan.
Reply

Logout Mark Read Team Forum Stats Members Help
2 Problems in regards to MusicDB (with kodi-headless)0