Page 1 of 1

Add Song - Auto get info

Posted: Sat Jun 25, 2005 4:58 pm
by gratajik
I'm doing this to add a song:

Dim songData As New SDBSongData
songData.Path = "c:\test.mp3"
songData.UpdateDB

When doing this, is there some way to tell MM to figure out the details itself? Like file save, song name, genre, etc? (I'd assume by ID3 info). I could fill out each member, but for some fields I'd have to go mucking through the ID3 info myself, which I rather not have to do.

Thanks
-Greg

Posted: Sun Jun 26, 2005 1:33 pm
by Peke
I'm not 100% sure but try with:

Code: Select all

Dim TempSongData
Set TempSongData = SDB.NewSongData
TempSongData.Path = "c:\test.mp3"
TempSongData.MetadataFromFilename
If TempSongData.ReadTags Then
;Some Code
;...
End if
;Some Code
;...
; On End Write Songdata into File
If TempSongData.WriteTags then
;Some Code
;...
End IF
You Should Look Into Scripting Manual on Developer page.