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).
Got a Kodi problem? Provide us with a full Debug log (wiki) || Usefull pages: First time user (wiki) || Troubleshooting (wiki) || Free content (wiki) || Forum rules (wiki) || VPN policy (wiki)
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)|

My Blog Posts
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Switch between Databases00
This forum uses Lukasz Tkacz MyBB addons.