Kodi Community Forum

Full Version: Kodi profiles - Separate is not separate
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to setup 2 different profiles for Kodi. Following the wiki I created this profile:

Image

and choose for "Start Fresh" for settings and media sources.

After I login to the new profile I see all my media from the master profile. I expected to see absolutely nothing. I thought well, let's update the library. OK all my media is gone now, good! But let me just check my master profile just to be sure. WHAT?! Here also is everything gone. Seems to me separate is not so separate?

After restoring everything from backup (Lesson learned: you should backup your watched state separately Sad ). I tried it again just be make sure I didn't make an error the first time. But the result is the same. I still see the media from the master profile.

My setup:

Odroid C2 with CoreELEC 9.2.1, Kodi 18.5. My media sources are on a FreeNAS nfs-share. My database is a remote MariaDB. Using these configs:

advancedsettings.xml:
xml:
<advancedsettings>
  <videodatabase>
    <type>mysql</type>
    <host>10.0.0.173</host>
    <port>3306</port>
    <user>***</user>
    <pass>***</pass>
  </videodatabase>
  <musicdatabase>
    <type>mysql</type>
    <host>10.0.0.173</host>
    <port>3306</port>
    <user>***</user>
    <pass>***</pass>
  </musicdatabase>
  <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
  </videolibrary>
</advancedsettings>

sources.xml
xml:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>Videos</name>
            <path pathversion="1">/storage/videos/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>TV Shows</name>
            <path pathversion="1">/storage/tvshows/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>film</name>
            <path pathversion="1">nfs://10.0.0.12/mnt/tank/media/film/</path>
            <path pathversion="1">nfs://10.0.0.12/mnt/tank/media/netflix_kodi/movies/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>serie</name>
            <path pathversion="1">nfs://10.0.0.12/mnt/tank/media/serie/</path>
            <path pathversion="1">nfs://10.0.0.12/mnt/tank/media/netflix_kodi/shows/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>youtube</name>
            <path pathversion="1">/storage/.kodi/userdata/addon_data/plugin.video.youtubelibrary/Streams/TV/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>youtube music</name>
            <path pathversion="1">/storage/.kodi/userdata/addon_data/plugin.video.youtubelibrary/Streams/MusicVideos/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
        <source>
            <name>Music</name>
            <path pathversion="1">/storage/music/</path>
            <allowsharing>true</allowsharing>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
        <source>
            <name>Pictures</name>
            <path pathversion="1">/storage/pictures/</path>
            <allowsharing>true</allowsharing>
        </source>
    </pictures>
    <files>
        <default pathversion="1"></default>
        <source>
            <name>repoyatse</name>
            <path pathversion="1">https://yatse.tv/repo/</path>
            <allowsharing>true</allowsharing>
        </source>
    </files>
    <games>
        <default pathversion="1"></default>
    </games>
</sources>

After some searching I came across this thread: HOW-TO: 5 User XBMC. It gave me the idea to strip the above 2 xml files from the database and media sources:

advancedsettings.xml:
xml:
<advancedsettings>
  <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
  </videolibrary>
</advancedsettings>

sources.xml:
xml:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <games>
        <default pathversion="1"></default>
    </games>
</sources>

And voila, it worked. My new profile has no media.

So the big question now is, is my understanding of separate (as mentioned in the Kodi wiki) way off, or is this a bug (probably caused by my database en media source configuration)?
The master profile is a special one, and gets loaded before any other profile. A side effect of this can be if you use something in master and don't overwrite it in the other profile, then it stays loaded and active. I'd suspect that's what's happened here perhaps.

If you're using profiles, it's best to either not set anything at all in the master profile, or only put items in there that you want in all profiles.
Sort of.  The first AS.xml is using shared MySQL/Mariadb databases.  The second is using local databases.  If you use profiles, each profile gets its own local database unless you are using MySQL/Mariadb in which case you need to set up multiple databases in that as detailed in the thread that @didi82 linked to.  Benefits of that are the same as single user shared db but across profiles.  It's more difficult to set up and maintain though as you need to go back through it all if you upgrade Kodi and the db version changes.
Did anybody find a soulution for this issue, I have the same?

If I copy the Master Profile to a new one, will everything like menu settings, advancedsettings.xml, sources etc follow to the new profile?

What will happen to the new profile if I delete all sources and so on in the Master Profile? Will everyting be as it was?

I use a central database with mysql, will that make any difference?
It depends a little on how it's set up.

If you have it to always boot directly into a particular profile, then only that profile will be loaded and its settings applied.

But if you use the menu to select the profile to load, then that menu runs under the master profile. So if you have information/settings in that, those are loaded at that point and then when you select the new profile that one is loaded over the top of it. So if there are settings that are in the master but not the other profile (for example MySQL (wiki) settings) then those are applied even under the other profile.

Basically what will happen in that scenario is the master profile is loaded, then the other profile is loaded over the top. For any setting that's in both profiles, the other profile one will be used (it will overwrite the one in the master profile), but anything that's in only one of the profiles will also be used.

So if you are going to use profiles, it's strongly recommended either to not have anything in the master profile at all, or at the very least to only have settings there that you want applied to all profiles that are used.
(2021-01-14, 16:15)DarrenHill Wrote: [ -> ]It depends a little on how it's set up.

If you have it to always boot directly into a particular profile, then only that profile will be loaded and its settings applied.

But if you use the menu to select the profile to load, then that menu runs under the master profile. So if you have information/settings in that, those are loaded at that point and then when you select the new profile that one is loaded over the top of it. So if there are settings that are in the master but not the other profile (for example MySQL (wiki) settings) then those are applied even under the other profile.

Basically what will happen in that scenario is the master profile is loaded, then the other profile is loaded over the top. For any setting that's in both profiles, the other profile one will be used (it will overwrite the one in the master profile), but anything that's in only one of the profiles will also be used.

So if you are going to use profiles, it's strongly recommended either to not have anything in the master profile at all, or at the very least to only have settings there that you want applied to all profiles that are used.

I guess I have to make a back up of all my settings.
Wipe Kodi and reinstall
Directly add a new profile and import my old backup to that profile
Then make a second profile and set that up the way I want it.

Thanks for the help Smile