Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Switch between Databases
#1
Hi,
I want a special setup and couldn´t find a good solution for it. Sorry, if this question has been asked before.
I got an Android TV with KODI running and a NAS with SQL Database for music and video, configured in the advancedsettings.xml. 
Also there is an extra HDD connected to my TV.
As my NAS is not on all the time, I copied my music also on the HDD. I deleted the setting for the music database in the advancedsettings so it doesn´t connect to the NAS database and generated a new one for music in the local KODI installation.
Is there an option or addon to switch between both databases, to use the internal if the NAS is switched off and use the SQL on the NAS if it´s turned on?
The music is just a copy, both have the same content.
Thanks in advance
Reply
#2
(2020-05-23, 13:18)CUL8R Wrote: Hi,
I want a special setup and couldn´t find a good solution for it. Sorry, if this question has been asked before.
I got an Android TV with KODI running and a NAS with SQL Database for music and video, configured in the advancedsettings.xml. 
Also there is an extra HDD connected to my TV.
As my NAS is not on all the time, I copied my music also on the HDD. I deleted the setting for the music database in the advancedsettings so it doesn´t connect to the NAS database and generated a new one for music in the local KODI installation.
Is there an option or addon to switch between both databases, to use the internal if the NAS is switched off and use the SQL on the NAS if it´s turned on?
The music is just a copy, both have the same content.
Thanks in advance

Edit: Tried with profiles, but as the advancedsettings stays the same, I cannot use two different locations of the DB.
Will have to edit the advancedsettings.xml every time I switch around. Or just use Music on local HDD. 
I have my albums on the HDD and some other music on the NAS, so both at once would be great.
Reply
#3
(2020-05-23, 16:27)CUL8R Wrote: Tried with profiles, but as the advancedsettings stays the same, I cannot use two different locations of the DB.
Will have to edit the advancedsettings.xml every time I switch around.

Setting up profiles is still a bit shakey in v18, but should be doable when done manually.
In each profile you will have an advancedsettings.xml file, in which you can specify your MySQL database (or not).
Reply
#4
To clarify a little, you can have your advancedsettings.xml (wiki) file in your userdata (wiki) folder, and also individual ones for any profiles you have (to be found in sub-folders from the profiles folder, also in userdata (wiki)). What will happen is the main one is loaded first, and then any secondary one from the profile is loaded in after that. If you look in your debug log (wiki) you can actually see both being loaded.

So what will happen is if you put your MySQL (wiki) stuff into the main one, then it will be loaded for every profile. If you just put it in the profile one, then only that profile will use it. And if you set it in both, then the one in the profile will overwrite the one in the main one as it is loaded afterwards.

But personally I always recommend to anyone who is using profiles to not use or set anything up at all in the main default master profile, or at least to only put there stuff that should apply to every profile, not just the master one.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#5
(2020-05-23, 13:18)CUL8R Wrote: Hi,
I want a special setup and couldn´t find a good solution for it. Sorry, if this question has been asked before.
I got an Android TV with KODI running and a NAS with SQL Database for music and video, configured in the advancedsettings.xml. 
Also there is an extra HDD connected to my TV.
As my NAS is not on all the time, I copied my music also on the HDD. I deleted the setting for the music database in the advancedsettings so it doesn´t connect to the NAS database and generated a new one for music in the local KODI installation.
Is there an option or addon to switch between both databases, to use the internal if the NAS is switched off and use the SQL on the NAS if it´s turned on?
The music is just a copy, both have the same content.
Thanks in advanc

I'd just keep all the music on the local source and be done with it. Other than play count I don't think there is anything really special that the db does for music that I've noticed. Doesn't keep listened status and stuff. Of course you will have to keep up with music on both sources, but that is something you are already doing. Ultimately though if I may I'd ask why is the Nas not on all the time already. That is the point of a server / nas. Always available for anyone at any time and prevents unnecessary duplication. Maybe none of my business of course, but I am curious.
Reply
#6
(2020-05-29, 18:33)jmgibson1981 Wrote: Other than play count I don't think there is anything really special that the db does for music that I've noticed. Doesn't keep listened status and stuff.
The main thing the music library provides is a rich way to browse your music collection when deciding what to play, how rich is up to the user to do quality tagging and/or fetch the art and addirtional artist and album info that matters to them. generally that data is static.

The dynamic data that the music library keeps is play count, last played date and any user rating that you set. These can be exported/imported so you can move playback history from one installation to another, but that isn't going to be convient for the OP to do daily.

The only way to switch between using MySQL client/server setup and local SQLite is to change advancedsettings.xml and restart, again not convenient.

I also have to wonder why not leave the NAS on? But if a consistent playback history isn't important to you then I would be tempted to run on local SQLite music databases because they are so much faster than a client server set up using MySQL/MariaDB.
Reply

Logout Mark Read Team Forum Stats Members Help
Switch between Databases0