MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 2 » Help on Development


Help on Development Want to help with the development of MediaPortal 2? Then this is the right place for you.

Reply
 
LinkBack Thread Tools Display Modes
Old 2008-01-13, 00:33   #1 (permalink)
Portal Member
 
Join Date: Apr 2006
Posts: 195
Thanks: 0
Thanked 2 Times in 2 Posts


Default Database implementations/media info stuff?

Ive been studying the MP2 sources to get familiar with the way it works.

I'm extremely interested in shared database solutions so i've spent some time looking at the database solutions.

Currently it seems that all "plugins" call DatabaseFactory.CreateFromID() (MediaPortal.Database/Implementation)

And this always defaults to sqlite.

So, if i implement MediaPortal.Database/Implementation/MySql, will it be usable?

Is this a temporary solution only, will it be possible to define a implementation type for each "plugin" when the product nears release.



Also, bit off the topic, but id like some info on the media info stuff, ie if i want to implement a movie info scraper, what should it do? is there an interface for this already, like (IMediaInfoProvider -> MovieInfoProvider).

I'd guess it should implement something like List<MovieChoice>->IInfoChoice GetChoices(string movieName), SelectItem (IInfoChoice movieItem) etc

im just guessing here so any info welcome
__________________
amd BE2350 / 2GB / 8500gt / terratec diversity / xp sp2
deebo is offline   Reply With Quote
Old 2008-01-14, 06:58   #2 (permalink)
Portal Developer
 
Join Date: May 2005
Location: Switzerland
Posts: 1,341
Thanks: 4
Thanked 55 Times in 34 Posts


Default

Hi deebo,

I just made this change the other day. See Database task list: http://pms.team-mediaportal.com/inde...tive_project=1


Before this all plugins were selecting their own database. Now they are DatabaseFactory sets it. The plan way to have this configurable. Once I complete my work the existing Database implementations will become (sub)plugins. This will allow new database implementations (MySQL, etc) to be added via a plugins

However, I planned to only have one database that all plugins use (configurable). I was not planning to allow different databases per plugin?

Does anyone else feel they need to be able to have multiple databases? With different plugins using different ones?

Last edited by James; 2008-01-14 at 07:01.
James is online now   Reply With Quote
Old 2008-01-14, 15:14   #3 (permalink)
Portal Member
 
Join Date: Apr 2006
Posts: 195
Thanks: 0
Thanked 2 Times in 2 Posts


Default

that depends, i was just thinking that if everything is wrapped with databases, it might be a good choice to contain small things like share info, configurations etc in a local sqlite, but movie info, series info, tv info etc etc in a remote mysql database

does the core handle its own settings somehow are all are settings "plugins" like most of the mp2 architechture seems to suggest?
__________________
amd BE2350 / 2GB / 8500gt / terratec diversity / xp sp2
deebo is offline   Reply With Quote
Old 2008-01-16, 14:32   #4 (permalink)
Portal Developer
 
Join Date: May 2005
Location: Switzerland
Posts: 1,341
Thanks: 4
Thanked 55 Times in 34 Posts


Default

There is a Settings Manager, which will store the settings for all plugins and parts of MP-II. It uses xml files instead of a database.

Last edited by James; 2008-01-17 at 18:14.
James is online now   Reply With Quote
Old 2008-01-18, 05:58   #5 (permalink)
Portal Member
 
Join Date: Nov 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Standalone xml file doesn't sound like the best idea if you want to create a system that is as easy to manage as possible when there are multiple clients. Xml might still be good for storing the actual settings, but you might want to consider storing settings in an xml-file but storing the said xml in the db. That way your clients could easily synchronize settings (i.e. that xml-file) from central db.
willow is offline   Reply With Quote
Old 2008-01-23, 00:06   #6 (permalink)
Portal Member
 
Lesther's Avatar
 
Join Date: Jan 2008
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

hi,

Sorry for my little knowledge, but i believe that if the system is centralized will allow in the future some cool features like monitor what on system is doing and the follow me feature like linuxmce. Again sorry if what I'm saying doesn't make sense...
Lesther is offline   Reply With Quote
Old 2008-01-30, 18:42   #7 (permalink)
Portal Developer
 
Join Date: May 2005
Location: Switzerland
Posts: 1,341
Thanks: 4
Thanked 55 Times in 34 Posts


Default

Hi Lesther,

Its not a bad idea. At the moment user management is planned for a later release. Some thinking has already taken place, but it is still early days.

There is however always a problem with central storage. If the central server is not available the features that require it will not work. So I think some kind of synchronisation would be better.

/James
James is online now   Reply With Quote
Old 2008-01-30, 19:24   #8 (permalink)
Portal Developer
 
Join Date: May 2005
Location: Switzerland
Posts: 1,341
Thanks: 4
Thanked 55 Times in 34 Posts


Default

The database implementations are now loaded from the plugin space.

There are currently two implementations SQLite and SqlServer. New one can now be added via plugins.
James is online now   Reply With Quote
Old 2008-01-30, 22:46   #9 (permalink)
MP Donator
 
uggabugga's Avatar
 
Join Date: Feb 2007
Location: Torshavn
Posts: 61
Thanks: 6
Thanked 0 Times in 0 Posts

Country:


Lightbulb

Hi everyone,
Just wanted to make a little comment on this thred/matter
I would wish for the possibility(right after MPII has been installed) to be asked if I would like to use my local saved xml file or load one(and use/sync) from my "server".
But I think this should be divided into 2 kind of profiles. One "config" profile(remote control, codec selection if codec present, display settings setup. Settings that are/could be more HW related for the individual HTPC). This way when reinstalling Windows, one would apply this config file first.
The other kind of profile should be more of a "media" profile, that is more general in use(pictures, movies, series, skin choice and other media related.) One could dream to extend this to include Startup-delay time, skin, whether and so on, you get the picture.
Remember that this is just me "thinking out load here" so please do comment if there is something that I might not have given enough thought(probably is ) or you disagree on.
__________________
#########
#UggaBugga#
#########
uggabugga is offline   Reply With Quote
Old 2008-03-18, 15:05   #10 (permalink)
Portal Member
 
PrplHaz4's Avatar
 
Join Date: Aug 2007
Age: 27
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts

Country:


Default

Quote:
Originally Posted by James View Post
There is however always a problem with central storage. If the central server is not available the features that require it will not work. So I think some kind of synchronisation would be better.

/James
I beleive the way that the MythTV project has done it is to use Master/Slave dbs, where your master acts as a publisher to each of the slaves/clients, so you get a situation where settings are basically cached locally, but always available through the master when anything changes or an updated configuration is loaded.

This also allows you to de-centralize storage, but have all media...etc accessible from everywhere...you'd just have to make sure to write some smart code that can work on/offline as needed, and handle a good deal of special events...
PrplHaz4 is offline   Reply With Quote
Reply

Bookmarks

Tags
database, implementations or media, info, stuff

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No Media Info during Playback of a Mounted DVD Image T-Buster 0.2.3.0 RC3 and SVN Builds 0 2007-10-23 19:35
Display info from movie database grubi General Support 2 2007-10-06 09:57
Noob Alert...Media PC being Built...info needed ghandi General Support 5 2006-08-31 22:53
Editing Media Portal Database petermcc Tips and Tricks 4 2006-08-26 07:59
Importing DVR-MS info into a new database? ASiDiE General Support 1 2006-08-21 19:13


All times are GMT +1. The time now is 07:58.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress