bidossessi Wrote:Most new XBMC users are non-tech, so it will probably be cumbersome. However, we should keep in mind that most users who want to go the centralized database route are ready/willing to invest a little more time and research into making it work. They probably already have a central db and are thinking of ways to have XBMC stock it's stuff in there as well (my case anyway).
Maybe XBMC-ODBC connector could be hidden in an advanced setting so that only people who REALLY want to set it up will go that far.
XBMC's ease of setup/use should not be lost in this endeavour if possible, but a centralized database is not really something trivial, and the user should not expect it to be, in my opinion.
Same here. This is also why I wouldn't change the current sqlite stuff to use ODBC but keep separate sqlite/ODBC routines in the code. An advanced setting sounds like the place to put this since it is clearly something for advanced users. If someone manages to setup a database server, home network and owns several HTPCs to make real use of the feature, he probably can get the ODBC stuff working. And there will probably be tutorials in the forum once it is implemented.
I just tried to create an ODBC datasource on Windows Vista Business to connect to a mysql database on a Linux machine. The ODBC connector provided by the official mysql page was detected without any problems, in the configuration I could set datasource-name, server, port, username, password and database. That was all that was necessary on Windows to have it working. On Linux (Ubuntu Server) I had to modify the mysql my.cnf since mysql by default binds to localhost instead of LAN or 0.0.0.0 IP which disables external connections. So this is already a step for advanced users there.
From that test it also looks like in ODBC every datasource is connected to one database. So for XBMC there would be several datasources for the program, video, music, views databases.
I didn't have a look at the XBMC database code itself but from the look at the examples of the Simple ODBC API library the ODBC code seems to be pretty simple since it only needs to know the datasource name.
Code:
<advancedsettings>
<odbc>
<music_database>xbmc_music</music_database>
<program_database>xbmc_program</program_database>
<video_database>xbmc_video</video_database>
<viewmodes_database>xbmc_viewmodes</viewmodes_database>
</odbc>
</advancedsettings>
One thing to also think about is the profile location. If the profile is local, but the database is on a central server, when a user adds a movie to the database, the fanart/poster/thumb will be downloaded to the machine on which the user adds the movie. Other machines would have access to the same database and can list the movie but do not have the images to display. So to make this really work XBMC would also have to use a centralized location for e.g. Thumbnails (and probably script/plugin data etc.). Just having the profile stored on a share wouldn't be helpful since it could be possible to have e.g. two XBMC setups, one running on a FullHD and one on a 720p TV - they would need to have separate resolution information. There might be other settings which need to be kept de-centralized as well.