Proposal for a shared common video database over network?
#1
Lightbulb 
I know this has been discussed a lot, but I would really like to have a common video database for multiple xbmc frontends. I've looked through the code and this doesn't seem to be too difficult to do for the videos.

I would like to volunteer to code something up, but would like feedback first and a few questions answered to ensure the code would be along the lines of something that would be accepted to SVN.

I would propose using a mysql server over the network. The idea would be to add a GUI setting to either use the local sql database as it is now (default) or to specify the address, userid, password for a networked mysql server. I don't think this will be too difficult to do.

The question would be how to handle profiles. Each profile can have its own video database. I could create a database in mysql on a per profile basis rather than a global database. This would maintain the concept of profiles.

This should work also for the windows, os-x and xbmc versions.

What do you think? Anything over looked? Underestimation of the effort?

If this works out, I could then look at the music databases in a similar fashion.
Reply
#2
Basically it would involve replacing the sqlitedatabase.cpp layer with something else. There's already a baseclass in place, but note that it's not all needed for implementation - there's some assumptions made in the sqlite layer (such as we never iterate backwards through returned rows, and never use the edit field stuff etc.) so look primarily at the sqlite implementation to begin with. Feel free to not get stuck down if the interface could be improved in some way, though ofcourse the sqlite interface would need changing as well.

Be careful that any pragmas set are either ignored or translated as appropriate - as you can see, I'm not a db guy Wink. The rest of the SQL should work out of the box I should think.

If you have multiple profiles then IMO it'd be easiest just to have multiple databases as you suggest - instead of each profile reading from their own database folder, it would read from a different database on the network. All the profiles have separate settings, so this shouldn't be a problem.

Good luck, and let us know if you have any queries (heh).

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Lightbulb 
I think that best would be if you first could add a ODBC (Open Database Connectivity) database abstraction layer for XBMC, see:
http://forum.xbmc.org/showthread.php?tid=37449

This should be the standard API that separate XBMC from the database and enable you to use almost any SQL backend.

wstewart Wrote:I know this has been discussed a lot...
For reference, I believe that these are the discussions that wstewart are referring to here:
http://forum.xbmc.org/tags.php?tag=synchronize

Happy coding! Big Grin
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
thanks for the tip, as I posted in http://forum.xbmc.org/showthread.php?tid=37449, I am looking at unixOBDC as it seems to have the same API as the microsoft OBDC API
Reply

Logout Mark Read Team Forum Stats Members Help
Proposal for a shared common video database over network?0