Import database form Collectorz MP3 Collector
Import database form Collectorz MP3 Collector
Hey!
I have used before MP3 Collector from Colectorz.com and had create a .mpc database with al my MP3 CD's in it. Now I want to import this database to MM, but I can't figure out how! Please help me because I don't want to scan all my MP3's CD's again!
In MP3 Collector there is an export function to .txt, .html, .xml. Can someone help me to import them?
Thanx!
Ewoud
I have used before MP3 Collector from Colectorz.com and had create a .mpc database with al my MP3 CD's in it. Now I want to import this database to MM, but I can't figure out how! Please help me because I don't want to scan all my MP3's CD's again!
In MP3 Collector there is an export function to .txt, .html, .xml. Can someone help me to import them?
Thanx!
Ewoud
@Bex: I think the .mpc file is a database file not a music file.
@Ewoud: Email me the .mpc file and I'll have a look.
@Ewoud: Email me the .mpc file and I'll have a look.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Thanks for the .mpc file. I am confused however, does MP3 Collector not allow you to save the information to the tags? Could you not then rescan this information into MM?
If not, please export as .xml and .txt and email them to me so I can decide which would be easier to read with a script.
If not, please export as .xml and .txt and email them to me so I can decide which would be easier to read with a script.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
From the "File" menu select "Add/Rescan...", select the folder with your tracks. This should add all the information from the tags to the MM database. What fields are in the "MP3 Collector" database which are not written to the tags?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
@Trixmoto:
Well, I guess Ewoud means it would be too much work to scan all his mp3 cd's (not hard disk) again, now for MM. Importing would be much faster (and human).
The exported TXT file is probably the easiest to use, as you can read in all the lines one by one and get the separated fields out of it.
For the XML file, you would need to import some XML object and add more difficult code to make it work.
(Just FYI)
Oh, it would be so much fun to use a comma separated import feature like Excel's, or like MM's way of tagging (place the Fields in the right "context").
If this comma-separated-file importing becomes asked a lot (for programs able to export to txt), then a built in importing function (like the tagging function) would be great.
@Ewoud:
When exporting the txt file, make sure you export all fields you want (using the "Fields..." button in the "Export To Text" dialog), e.g. the fields that are filled.
Also write down all the names and order of the fields that you are exporting to the text file (comma or semicolon separated)
Cheers
Steegy
Well, I guess Ewoud means it would be too much work to scan all his mp3 cd's (not hard disk) again, now for MM. Importing would be much faster (and human).
The exported TXT file is probably the easiest to use, as you can read in all the lines one by one and get the separated fields out of it.
For the XML file, you would need to import some XML object and add more difficult code to make it work.
(Just FYI)
Oh, it would be so much fun to use a comma separated import feature like Excel's, or like MM's way of tagging (place the Fields in the right "context").
If this comma-separated-file importing becomes asked a lot (for programs able to export to txt), then a built in importing function (like the tagging function) would be great.
@Ewoud:
When exporting the txt file, make sure you export all fields you want (using the "Fields..." button in the "Export To Text" dialog), e.g. the fields that are filled.
Also write down all the names and order of the fields that you are exporting to the text file (comma or semicolon separated)
Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
I must dissapoint Ewoud
Even if we manage to make script that will import exported XML the big big problem will be CD Serials which is read by MM so recognize accessability of tracks and to assign drive letters to "?:\" paths in MM
There will be still need to insert CD in Drive althru all tag info that have been changed after CD is burned will be preserved in MM lib.
So my conclusion is that beside just importing of MP3 Collector database there must be way to assign serial number to Media(Media table in MDB) in MM lib.
Even if we manage to make script that will import exported XML the big big problem will be CD Serials which is read by MM so recognize accessability of tracks and to assign drive letters to "?:\" paths in MM
There will be still need to insert CD in Drive althru all tag info that have been changed after CD is burned will be preserved in MM lib.
So my conclusion is that beside just importing of MP3 Collector database there must be way to assign serial number to Media(Media table in MDB) in MM lib.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
This is only a problem if it is necessary for Ewoud that MM recognizes the entered discs. If not, no problem. MM works without (media field or) serial number.the big big problem will be CD Serials which is read by MM so recognize accessability of tracks and to assign drive letters to "?:\" paths in MM
But maybe it would be handy if you could "relink" the imported albums when you enter the corresponding cd. Therefore we need to know how to get the serial number from the entered disk.
Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Sorry, I'd lost track of the fact that the MP3's weren't on Ewoud's computer (although it does clearly state so at the top!)
Yes, having looked at the MPC, XML and TXT; TXT is definitely the easiest. The first line of the TXT lists the column headers (field names) so this is certainly possibly.
The CD serial number does pose a problem though. Maybe a script could also be written to assign a serial number to tracks? You can get the serial number using SDB.Media.SerialNumber, then use SQL?
Yes, having looked at the MPC, XML and TXT; TXT is definitely the easiest. The first line of the TXT lists the column headers (field names) so this is certainly possibly.
The CD serial number does pose a problem though. Maybe a script could also be written to assign a serial number to tracks? You can get the serial number using SDB.Media.SerialNumber, then use SQL?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Here's a script to add cd serial numbers to selected files:
EDIT: I haven't tested this a lot so please backup your MediaMonkey database first (If you don't know how, do a forum search). It's always possible that there is a problem. (SQL Update and Insert queries)
With Scripts.ini:
Cheers
Steegy
EDIT: I haven't tested this a lot so please backup your MediaMonkey database first (If you don't know how, do a forum search). It's always possible that there is a problem. (SQL Update and Insert queries)
Code: Select all
'==========================================================================
'
' MediaMonkey Script
'
' NAME: AssignCDMedia v1.0
' DESCRIPTION:
' Assign the selected tracks to the entered cd. This is necessary for tracks that are imported
' from antoher database and need to be relinked to the original cd, when that one is entered.
' The function has to be manuelly invoked through the Tools>Scripts menu.
' It finds all available cd volumes and then asks to which one you want to assign the tracks.
'
' AUTHOR: Steegy aka RC
' DATE : 20.12.2005
'
' INSTALL:
' - Copy script to MM directory "Scripts" (and add an entry to "scripts.ini")
'
'==========================================================================
Dim myVolume
Sub AssignCDMedia
Set list = SDB.SelectedSongList
If list.count = 0 Then
Set list = SDB.AllVisibleSongList
If list.count = 0 Then
Result = SDB.MessageBox("Nothing Selected!", mtError, Array(mbOK))
Exit Sub
End If
End If
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk")
For Each objDisk in colDisks
If objDisk.FileSystem = "CDFS" And objDisk.DriveType = 5 And objDisk.VolumeSerialNumber <> "" Then
'"Device ID: " & vbTab & objDisk.DeviceID
'"Volume Name: "& vbTab & objDisk.VolumeName
'"File System: "& vbTab & objDisk.FileSystem
'"Drive Type: "& vbTab & objDisk.DriveType
'"Volume Serial Number: "& vbTab & objDisk.VolumeSerialNumber
Set myVolume = objDisk
If SDB.MessageBox("Device ID: " & vbTab & objDisk.DeviceID & vbCrLf _
& "Volume Name: "& vbTab & objDisk.VolumeName & vbCrLf & vbCrLf _
& "Is This The CD You Want?", mtConfirmation, Array(mbYes, mbNo)) = mrYes Then
MediaDeviceID = (Asc(Left(myVolume.DeviceID,1))-65)
Set Iter = SDB.Database.OpenSQL("SELECT (Max(IDMedia)+1) as NextMediaID FROM Medias;") 'We don't need this to add a record because IDMedia is autonumbering. But we would need it to find the ID of the added record, so I'm using it anyway.
MediaVolSN = ("&H" & myVolume.VolumeSerialNumber)*1
NextMediaID = Iter.StringByIndex(0) 'or StringByName("NextMediaID")
MediaLabel = myVolume.VolumeName
Set Iter = SDB.Database.OpenSQL("SELECT IDMedia FROM Medias WHERE SerialNumber = " & MediaVolSN & ";")
If Iter.EOF Then
SDB.Database.ExecSQL("INSERT INTO Medias(IDMedia, SerialNumber, DriveType, Label, ShowLabel, TurnedSN, DriveLetter) Values (" & NextMediaID & ", " & MediaVolSN & ", 5, '" & MediaLabel & "', '" & MediaLabel &"', 0, " & MediaDeviceID & ");")
Else
NextMediaID = Iter.StringByIndex(0)
End If
For i=0 to list.count-1
Set mySong = list.Item(i)
SDB.Database.ExecSQL("UPDATE Songs SET IDMedia = " & NextMediaID & " WHERE ID = " & mySong.ID & ";")
Next
Exit Sub
End If
End If
Next
End Sub
With Scripts.ini:
Code: Select all
[AssignCDMedia]
FileName=AssignCDMedia.vbs
ProcName=AssignCDMedia
Order=12
DisplayName=&AssignCDMedia
Description=AssignCDMedia
Language=VBScript
ScriptType=0
Steegy
Last edited by Steegy on Tue Dec 20, 2005 8:34 am, edited 1 time in total.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Looks good to me (although I'd have checked for selected tracks at the beginning). I suppose I'd better get working on the import script then!
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
You're right, I changed it now. Thanks!
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).