Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Linux Kodi, multiple users, centralized DB update
#1
I salute the Kodi community.
Today I have a special problem again.
My household is running a media server with Kodi 19.4 on PCLinuxOS and Tiny Media Manager 4.3.2.
The database is MariaDB 10.2.
Furthermore I have 5 TX3 Mini (Kodi 19.4 Android) in use and one Kodi 19.4 on a Linux machine (PCLinuxOS).
This works fine so far. I update the database on the Mediaserver and on all devices the update is taken over.
Everything is fine up to this point.

Now to my problem:

1st user: Kodi on Linux and TX3 Android.
2nd user: 2x TX3 Android
3rd user: TX3 Android
4th user: currently Twonky

My idea now is the following:
The databases should be kept up to date for all users via the media server.
Newly added content should be displayed for all clients.
Already seen content must be user specific.
Creating new profiles is no problem.
How must the advantedsettings.xml look like in this case?
I have the following setting (1st user):
Quote:<advancedsettings version="1.0">
  <videodatabase>
    <type>mysql</type>
    <host>192.168.0.82</host>
    <port>3306</port>
    <name>video_roland</name>
    <user>KODI</user>
    <pass>xxxxxxxx</pass>
  </videodatabase>
  <musicdatabase>
    <type>mysql</type>
    <host>192.168.0.82</host>
    <port>3306</port>
    <name>music_roland</name>
    <user>KODI</user>
    <pass>xxxxxxxx</pass>
  </musicdatabase>
</advancedsettings>

It seems to work with this; video_roland119 and music_roland82 are created. When I apply this setting to my TX3, it works as I want it to. When I update the database, this is applied to the other device.

Now I want to do this update on the server as mentioned before.
I log in with user 1, update DB.
I log in with user 2, update DB.
I log in with user 3, update DB.
Is such a procedure possible?

I would like to point out that English is not my native language.
If something was translated wrong, I ask for understanding.
Reply
#2
(2022-08-21, 14:06)rolandg Wrote: It seems to work with this; video_roland119 and music_roland82 are created. When I apply this setting to my TX3, it works as I want it to. When I update the database, this is applied to the other device.

The update is not performed on the server.
I still do that on my Linux machine.
Reply
#3
(2022-08-21, 14:06)rolandg Wrote: The databases should be kept up to date for all users via the media server.
Newly added content should be displayed for all clients.
Already seen content must be user specific.
Kodi does not support multiple users for the same database.
So #1 and #2 can work together, #3 only works with unique users/databases. Meaning, you'll end up with 3 separate databases, and 3 times of database updating.
Reply
#4
(2022-08-21, 17:18)Klojum Wrote:
(2022-08-21, 14:06)rolandg Wrote: The databases should be kept up to date for all users via the media server.
Newly added content should be displayed for all clients.
Already seen content must be user specific.
Kodi does not support multiple users for the same database.
So #1 and #2 can work together, #3 only works with unique users/databases. Meaning, you'll end up with 3 separate databases, and 3 times of database updating.
Thanks for your answer.
I realize that each user uses their own database.
Currently I have the original MyVideos119 and MyMusic82 for the master user.
Additionally I have video_roland119 and music_roland82 for the first user.
So there will be more databases in the future.
On the individual devices I see no problem there.
My question was about the advantedsettings.xml, how it must look like with multiple users.
Are all users declared in the /userdata/advantedsettings.xml
E.g..
<port>3306</port>
<name>video_roland</name>
<name>video_user2</name>
<name>video_user3</name>
<user>KODI</user>
or does each user get their own advantedsettings.xml in the Profiles folder?
Reply
#5
(2022-08-22, 01:50)rolandg Wrote: or does each user get their own advantedsettings.xml in the Profiles folder?

In case of profiles, each user has its own profile settings folder, resuhting in separate settings for addons as well as for the external database for each profile/user. Combining multiple database setups into 1 advancedsettings.xml file does not work that way in Kodi.
Reply
#6
Ok, so the advancedsettings.xml from /.kodi/userdata/ needs to go to the folders /.kodi/userdata/profiles/user1, /.kodi/userdata/profiles/user2, ...?
Is this correct?
This was actually the main question of my post.
Reply
#7
Yes, each profile extends the userdata folder and can have its own advancedsettings.xml file.
I have two profiles on a Kodi setup with
* /home/klojum/.kodi/userdata/profiles/testcase
and
* /home/klojum/.kodi/userdata/profiles/upstairs

Also note that the root folder of the userdata is for Kodi's default/main user. So, depending how you ultimately set up your profiles, you may want to keep the original there.
Reply
#8
Ok, thank you for your help.
I will test this in the course of the week and then report here from success or failure.
I wish you a nice week.
Reply
#9
As promised, here's some quick feedback.
It worked.
I can now keep all users up to date via Kodi on the server.
Thanks again.
Reply
#10
I've been wanting to do something like you described. With kids, mother-in-law in house................
Currently using separate computers to handle the different databases. I'm running MySQL

4 TVs on one
2 TVs on the other
2 TVs on yet another

Would you mind explaining the steps for the database and how to point the different profiles to the correct database

Thanks
Reply
#11
(2024-03-11, 16:53)cambone Wrote: I've been wanting to do something like you described. With kids, mother-in-law in house................
Currently using separate computers to handle the different databases. I'm running MySQL

4 TVs on one
2 TVs on the other
2 TVs on yet another

Would you mind explaining the steps for the database and how to point the different profiles to the correct database

Thanks

Found my answer:
Here

Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi, multiple users, centralized DB update0