Request -  External database settings in the main Kodi GUI
#1
At the moment setting up an external database for Kodi is still something that is set up via advancedsettings.xml, is it possible that this could now be done within the settings area of Kodi?

I realise that when it was first added HTPC's were expensive to buy, let alone have a separate server for Mysql and your media files to live on.

But nowadays we have Raspberry Pi's, Nvidia Sheilds for HTPC's, as well as a wealth of NAS Servers, not only that, a raspberry Pi, can at a pinch be a file server for a small household.

Also when the external database was added as a feature, there was no PVR backend either, as well as network TV cards.

Now it's commonplace for OTA broadcast around a flat/house, as well as users using more than one HTPC for throwing local media across their property, this I feel should be upgraded from an advanced setting to a 'standard setting' (although could still be 'hidden' as an expert setting within the Kodi GUI)

I feel, that if someone is willing to setup and scrape their local media, as well as setting up a PVR (TVHeadend for example) installing MySQL/PHPmyadmin etc shouldn't really be much of a huge step.

Although personally, when it comes to 'factory resetting' my HTPC's, we are really only talking about copying one more file across!

These are my feelings on why it should be, as well as knowing roughly why it is in advanced settings, is there any reason now it can't be?

If so, what are they?
Server: Windows Server 2016 Standard Hyper-V with Ubuntu Server VM, NFS shares and MySQL
Kodi: 2 Raspberry Pi 3 running Libreelec
My Setup thread | Setup Ubuntu / TVH / Schedules Direct
Reply
#2
There used to be an addon floating around in the past (Google 'kodi advanced settings addon') that provided a GUI in Modi to create and edit the advancedsettings.xml.

But, something like that would only help for the Kodi clients, the mySQL server would still need to be created and setup on the relevant platform. However I guess an addon could possibly be created to do that too?
If I have helped you or increased your knowledge please click the 'Thumb Up - Like' button to show me your appreciation :)

For YouTube questions see the OFFICIAL THREAD, with the Latest Info in Post 1 & 2, & the Personal API Key Instructions and FAQ in Posts 3 & 4 & more ;)
Reply
#3
Such an add-on (for advancedsettings.xml (wiki) rather than specifically for MySQL (wiki)) has always been somewhat divisive for support and allowing here.

There is the argument that lots of people use those files for various things, so something to help them do it and do it right would be a positive. But there is also the counter-argument that setting the thing up wrong (even if it's a valid file set-up) can cause all sorts of damage and issues to the Kodi installation, up to and including not working at all. Those settings are designed for the "advanced user" who would hopefully know what they were doing, and so the need for hand-holding in setting them up in the first place wouldn't be there (the old "giving chainsaws to children" argument).

The need for setting up the SQL server correctly (which is usually where the problems arise) is such an example of a time when making things simple enough for anyone to do might be counterproductive.
| 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) | Free Movies/TV Shows |
Reply
#4
Personally, I don't see the problem with leaving it in advancedsettings.xml .  If you are competent enough to set up some sort of file-sharing and an SQL server to go with it, editing advancedsettings.xml to get it to work should be pretty trivial.  Whilst I can sort of see an argument for making it 'more mainstream', I can also see that it could potentially open a much bigger 'can of worms' - giving people more settings to fiddle with will undoubtedly make them do just that.  Leaving things as they are means only people looking for this sort of thing will find it and even then, as Darren says, people can still make mistakes but it will be a lot less than if you plonk a bunch of settings in front of everyone.
Learning Linux the hard way !!
Reply
#5
OK, I wasn’t suggesting getting rid of advancedsetttings.xml, or adding mySQL into Kodi either, just adding the IP, username and password within the settings GUI.

I agree that advanced settings should stay as an xml file, also adding an addon opens a whole can of worms too. MySQL should always be outside of Kodi, whether that’s via docker, libreelec etc. Also if you are setting up MySQL it’s also not much of an ask to write a few lines in xml either.

TBH I personally don’t mind/care whether it’s in the GUI or in XML where I add those values, I just thought it might be time to be able to add these values within Kodi.

Edit: after re reading my OP I now see the confusion sorry!
Server: Windows Server 2016 Standard Hyper-V with Ubuntu Server VM, NFS shares and MySQL
Kodi: 2 Raspberry Pi 3 running Libreelec
My Setup thread | Setup Ubuntu / TVH / Schedules Direct
Reply
#6
MrMC has MySQL setup all done within the GUI I think, so if someone was interested then that code could maybe be taken as a basis for a Kodi implementation (for anyone who doesn't know MrMC is a Kodi fork currently based on Jarvis I believe).

Here it is https://github.com/MrMC/mrmc/commit/7555...d7660ddb85
Reply
#7
I totally agree with DarrenHil and such setup does not belong in the GUI cause it will just cause confusions and get more question that we want.
If you can setup a mysql database you should be able to create a simple advancedsettings.xml file.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#8
@Martijn  agreed, although if you are setting up a backend PVR backend, then you also add those values within the PVR addon.

If I take TVHeadend as an example, in the settings area of it, you are 'simply' adding the IP address, username, password and port number (if you have changed it). Having these values somewhere in the Kodi GUI settings would be no different.

@jjd-uk MrMC this was the reason why I suggested this in the first place.

Problem is, I agree on both sides of the coin, advancedsettings.xml is not that difficult to use, and if you have a good backup strategy, then its a write once, deploy many. (also there is a nice template on the Wiki)

On the other hand, it would be nice to have, as most settings are indeed within the settings side of the Kodi GUI.

Alhough, again agreed - it could open a whole can of worms in regard to support.
Server: Windows Server 2016 Standard Hyper-V with Ubuntu Server VM, NFS shares and MySQL
Kodi: 2 Raspberry Pi 3 running Libreelec
My Setup thread | Setup Ubuntu / TVH / Schedules Direct
Reply
#9
With this feature request

https://forum.kodi.tv/showthread.php?tid...pid2794286

And what I proposed, would it make sense to have a settings section purely for database admin, and have the MySQL admin under expert?
Server: Windows Server 2016 Standard Hyper-V with Ubuntu Server VM, NFS shares and MySQL
Kodi: 2 Raspberry Pi 3 running Libreelec
My Setup thread | Setup Ubuntu / TVH / Schedules Direct
Reply
#10
I'll throw out another reason NOT to put this configuration in the GUI: a database server like MySQL is just not ideal for Kodi. They are designed for larger data sets, workloads and interfaces where milliseconds don't matter as much as in Kodi, and more complex software environments.

Specifically, performance is not consistent - uncached queries to MySQL are notably slower than SQLite, cached queries are notably faster, and the cache flushes out queries inconsistently with library navigation so it's a tossup when browsing around the libraries. External servers are also much more difficult to set up, and as a completely different application they introduce a whole new class of concerns and more places for things to go wrong.

Ideally each Kodi installation would keep all data in a local SQLite database and there would be a way for them to share new information (like JSON-RPC, which has the majority of necessary bits already), but getting all of that set up is a lot more development work than swapping a SQLite DB with MySQL and writing portable queries. This is simply a quick-and-dirty solution that shouldn't be pushed up as a first-class feature.
Reply
#11
Yeh I would also be in the Mysql is a bad idea side of things Wink

Kodi clients being able to talk to each other via plug in and play or some API would be much better. Able to sync local databases without any central location is a much better idea in my opinion. This is how modern database replication works.

The ultimate idea is always to reduce options and make things simple for the end user. Just having 2 kodi clients on a network should be enough with a popup saying "would you like to share databases".

EDIT: Forgot to say you would need to have a good profile management as well for different users.
[Image: addon-TheMealDB-blue.svg] [Image: skin-EstuaryATF-green.svg]
Reply
#12
I was also thinking that too, as I do realise that when XMBP started, it was an XBOX and a computer with files on it that was only used. So I do realise that the database for kodi has historical reasons on why it was done the way it was done.

I also get it the MySQL was a quick and dirty way to get a shared database in the short term, and all the points against made by the team are valid.

It would be good to have an easier way to ‘share’ database information though that takes extra setting up out of the equation. What @docwra suggests also means that the Kodi database itself is backing itself up to every other kodi instance too, which then means that when one kodi instance falls over it will be easier set that box up too.
Server: Windows Server 2016 Standard Hyper-V with Ubuntu Server VM, NFS shares and MySQL
Kodi: 2 Raspberry Pi 3 running Libreelec
My Setup thread | Setup Ubuntu / TVH / Schedules Direct
Reply
#13
(2018-11-28, 15:12)tjay260476 Wrote: I was also thinking that too, as I do realise that when XMBP started, it was an XBOX and a computer with files on it that was only used. So I do realise that the database for kodi has historical reasons on why it was done the way it was done.

I also get it the MySQL was a quick and dirty way to get a shared database in the short term, and all the points against made by the team are valid.

It would be good to have an easier way to ‘share’ database information though that takes extra setting up out of the equation. What @docwra suggests also means that the Kodi database itself is backing itself up to every other kodi instance too, which then means that when one kodi instance falls over it will be easier set that box up too.
Yep pretty much it, replication(rather than centralisation) has many benefits.

In fact thinking about it a simple Add-on to copy a database to another device could pretty much solve this Smile SQLite is very nice and portable in that sense.
[Image: addon-TheMealDB-blue.svg] [Image: skin-EstuaryATF-green.svg]
Reply
#14
But what about it copying over paused, resumed and watched status over the various instances? Is that still doable in this situation? As they are all the reasons for MySQL at the moment.
Server: Windows Server 2016 Standard Hyper-V with Ubuntu Server VM, NFS shares and MySQL
Kodi: 2 Raspberry Pi 3 running Libreelec
My Setup thread | Setup Ubuntu / TVH / Schedules Direct
Reply
#15
(2018-11-28, 16:06)tjay260476 Wrote: But what about it copying over paused, resumed and watched status over the various instances? Is that still doable in this situation? As they are all the reasons for MySQL at the moment.
 I would personally just use the Trakt.tv Add-on for that.

But of course the watched status is held in the DB as well so assuming it could be a 2 way sync, then it would work locally on each device.

EDIT: I'm pretty sure an Add-on could also use the JSON interface to set a watched tag pretty easily if the DB's were the same.
[Image: addon-TheMealDB-blue.svg] [Image: skin-EstuaryATF-green.svg]
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
External database settings in the main Kodi GUI00