How to access and modify music database? (1 Viewer)

JulianBuss

Portal Pro
November 14, 2004
136
2
Hi,

for my iTunesSync-PlugIn I need to read and write data to the music database in MP.
I search the Plugin and GeneralDevelopment-forum, but did not find any hint about this.

What I need to do is:
1.) looking for a particular song, identified by title and length
2.) adding new songs to the database with data like title, artist, rating, number of times played, filepath...
3.) modifiyng existing entries

Any hint appreciated!
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
Try the MediaPortal.Music.Database namespace. You will need to create an instance of MediaPortal.Music.Database.MusicDatabase first, which will open the database connection. Then, you will be able to see all the various functions through intellisense if you're using VS2003.

Sam
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
Just saw your other post - it seems you're not using VS2003. Not sure if your IDE has intellisense, but if not, see Databases\Music\database.cs file for the music database code.

For example, to search for songs, use this function:
public bool GetSongs(int searchKind,string strTitle1,ref ArrayList songs)

I'm not on my dev computer, and looking at the code through SF isn't very appealing, but the functions are all available in the above file.

Sam
 

JulianBuss

Portal Pro
November 14, 2004
136
2
thanks for your tips; I think I will use VS2003 instead of Eclipse; since you all use VS2003, it's a good idea to use it, too :)
 

Users who are viewing this thread

Top Bottom