Merging database with external CSV file

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Maciek
Posts: 8
Joined: Wed Aug 13, 2003 5:10 pm

Merging database with external CSV file

Post by Maciek »

How difficult would be a task of merging MediaMonkey's databes with external CSV file? The CSV contains descriptions of all my MP3 files and it would be great to have those descriptions in the database (for example in Custom field).

I tried to import CSV to Lyrics (or Comments) ID3 tag using the tools that capable of such task, but they seriously limit the length of text imported making it unusable. I'm currently looking for tools allowing me edit MediaMonkey's MDB files directly, but I wonder if this is possible to do via scripting...
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

It would probably be possible, scripting is supposed to be used for such interactions between database and things outside of MediaMonkey. Let me know if you have any particular problem with it. Currently, the only source of information is the database itself and IDL description of all scripting objects and methods.

Some useful stuff:
- object SDB.Database and its method QuerySongs( addSQL), which returns all tracks in DB when addSQL=''
- Tracks are returned in a SongIterator object with methods Next, EOF and Item, which are as I hope self-explaining.
- then you can modify Song object (returned by Item of SongIterator) and write it back to DB using UpdateDB method.

If you miss any functionality in scripting, let me know and we can discuss adding it in next versions.

Jiri
Maciek
Posts: 8
Joined: Wed Aug 13, 2003 5:10 pm

Post by Maciek »

I decided that instead of learning VBScript, I would write the external program (in Python in my case) which would access the MediaMonkey.mdb and update it. It was quite easy, when I passed the hardest part - connecting to the database through ADO.

Anyway, now I have all functionality I require in the single application (Media Monkey) - search, preview and editing... This is great.
Post Reply