iDate Added 1.5 - Updated 23/01/2008
Re: iDate Added 1.5 - Updated 23/01/2008
I used this script to transfer across playcounts, ratings, play date and adddate - All I needed to finally uninstall iTunes. Thanks a lot!
-
- Posts: 4
- Joined: Thu Feb 23, 2012 6:34 am
Re: iDate Added 1.5 - Updated 23/01/2008
Hi dear people,
Looking for a flexible portable audio library with a good search I came across MM, which is to replace my old FileMaker sound library.
Now I would like to import my data set (CD, title, description, comments) in MM, to the more than 7,000 Title (noise) does not need to tag again.
FileMaker offers me the opportunity to export my records as the following formats:
Rennie Tab text files (. Tab)
Comma Separated Text files (. Csv)
DBF files (. Dbf)
Serierbriefdateien (. Number)
HTMLTabeIIendateien (. Htm)
FiIeM aker Pro files (. Fp7)
Daeaen XML (XML)
Excel 95 2OO4 revision folders (. Xls)
Excel workbooks [. Xlsx)
What can I import into MM? Emergency on I-Tunes as a sort of import-export "Translator"?
I have already tried the program: "iDateAdded15.mmip" which XML files are imported, but it does not recognize title.
Basically I have a file with 4 columns (CD, title, description, comments) that I have to teach MM. Based on the title name of the MM can detect a match to the imported sound files.
I would really like to use MM. Do you have any tips?
Looking for a flexible portable audio library with a good search I came across MM, which is to replace my old FileMaker sound library.
Now I would like to import my data set (CD, title, description, comments) in MM, to the more than 7,000 Title (noise) does not need to tag again.
FileMaker offers me the opportunity to export my records as the following formats:
Rennie Tab text files (. Tab)
Comma Separated Text files (. Csv)
DBF files (. Dbf)
Serierbriefdateien (. Number)
HTMLTabeIIendateien (. Htm)
FiIeM aker Pro files (. Fp7)
Daeaen XML (XML)
Excel 95 2OO4 revision folders (. Xls)
Excel workbooks [. Xlsx)
What can I import into MM? Emergency on I-Tunes as a sort of import-export "Translator"?
I have already tried the program: "iDateAdded15.mmip" which XML files are imported, but it does not recognize title.
Basically I have a file with 4 columns (CD, title, description, comments) that I have to teach MM. Based on the title name of the MM can detect a match to the imported sound files.
I would really like to use MM. Do you have any tips?
Re: iDate Added 1.5 - Updated 23/01/2008
I'm getting the error "Invalid procedure call or argument: 'Chr'" from line 226 of the script. This happens halfway through thousands of tracks.
iDateAdded error
I keep getting an error ("Invalid procedure call or argument: 'Chr'") after letting iDate run for quite some time.
I've already seen some discussion of the problem elsewhere in the forum (http://forum.mediamonkey.com/viewtopic. ... 30#p191984), but the suggested fix of editing C:\Program Files\MediaMonkey\Scripts\iDateAdded.vbs isn't doing me any good because I can't find that file anywhere on my computer.
Am I looking in the right place, or has the file been renamed or moved in the years since that thread?
I've already seen some discussion of the problem elsewhere in the forum (http://forum.mediamonkey.com/viewtopic. ... 30#p191984), but the suggested fix of editing C:\Program Files\MediaMonkey\Scripts\iDateAdded.vbs isn't doing me any good because I can't find that file anywhere on my computer.
Am I looking in the right place, or has the file been renamed or moved in the years since that thread?
Last edited by Lowlander on Tue Aug 27, 2013 1:20 am, edited 1 time in total.
Reason: Merged with existing topic
Reason: Merged with existing topic
Re: iDate Added 1.5 - Updated 23/01/2008
The script is still called the same, but if it's been installed for the local user only, then it will now be in this location... %appdata%\MediaMonkey\Scripts\
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.
Re: iDate Added 1.5 - Updated 23/01/2008
I hate to bring up old issues but I have the most current script and it's having the problem where it processes a handful of tracks but doesn't find them.
Re: iDate Added 1.5 - Updated 23/01/2008
I suspect the XML file has drastically changed in the 5 years since this script was last updated, so this doesn't surprise me. The script is very out of date.
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.
Error #1025 VBScript Compilation Error
So if I'm going to switch to MediaMonkey I want to transfer all my last played dates from itunes. People report having done this by modifying the iDateAdded script. I had a go but got the following error:
Error #1025 - Microsoft VBScript compilation error
Expected end of statement
itm.Play Date UTC = dad
I don't have much of an idea what I'm doing so can someone suggest how to fix this?
thanks
Error #1025 - Microsoft VBScript compilation error
Expected end of statement
itm.Play Date UTC = dad
I don't have much of an idea what I'm doing so can someone suggest how to fix this?
thanks
Re: iDate Added 1.5 - Updated 23/01/2008
Have you modified the script at all? The line of code should be "itm.DateAdded = dad" but your error message reports it as "itm.Play Date UTC = dad".
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.
-
- Posts: 35
- Joined: Mon Apr 07, 2014 2:59 pm
Re: iDate Added 1.5 - Updated 23/01/2008
Hi
The script breaks if any string data is on more than one line as it then assumes there are no more keys and execution does not reach the location data. This causes the sql songs query to be blank and no data to be returned causing the track to be not matched.
I added a regex test for intact string tags:
after Dim txt : Set txt = fso.OpenTextFile(xml,1,False) :
and after "Else" in Case 2 'reading track data :
The script breaks if any string data is on more than one line as it then assumes there are no more keys and execution does not reach the location data. This causes the sql songs query to be blank and no data to be returned causing the track to be not matched.
I added a regex test for intact string tags:
after Dim txt : Set txt = fso.OpenTextFile(xml,1,False) :
Code: Select all
Dim objRE : Set objRE = New RegExp
objre.Pattern="<string>([a-zA-Z\n\r\.\\0-99)\W])*<\/string>"
Code: Select all
If InStr(str,"<string>") > 0 And Not objRE.Test(str) Then 'string value that has breaks in it
Do Until objRE.Test(str)
str = str & txt.ReadLine 'add next line until string terminated correctly with closing tag
Loop
End if
Re: iDate Added 1.5 - Updated 23/01/2008
Thanks for this, I'll look at adding this into the next version.
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.
-
- Posts: 35
- Joined: Mon Apr 07, 2014 2:59 pm
Re: iDate Added 1.5 - Updated 23/01/2008
Hi
I have adapted your script for personal use to take Itunes xml exported by another music player and sync the play data (date last played and play count) to Media Monkey. Checking through the skipped tracks in the log I found that the fixhex function was not always decoding the file path correctly, again causing a failed match. I am not sure if the problem was in the source rather than the script, but found that changing the fixhex function increased the match count significantly by returning special characters such as in "Live In Gdańsk" correctly for example. I found also that characters such as - or " in the path were also not decoded correctly (again maybe due to source rather than script). I was unable to solve this problem, but as it affected only around 12 tracks I simply edited the paths in the source program and Media Monkey, attaining complete matches.
This is a great script, solved a big syncing problem I had.
My alternative to the fixhex function was
I have adapted your script for personal use to take Itunes xml exported by another music player and sync the play data (date last played and play count) to Media Monkey. Checking through the skipped tracks in the log I found that the fixhex function was not always decoding the file path correctly, again causing a failed match. I am not sure if the problem was in the source rather than the script, but found that changing the fixhex function increased the match count significantly by returning special characters such as in "Live In Gdańsk" correctly for example. I found also that characters such as - or " in the path were also not decoded correctly (again maybe due to source rather than script). I was unable to solve this problem, but as it affected only around 12 tracks I simply edited the paths in the source program and Media Monkey, attaining complete matches.
This is a great script, solved a big syncing problem I had.
My alternative to the fixhex function was
Code: Select all
Function Decode(fixhex)
Dim s1,s2,s3,d1,d2,b1,b2,b3
Dim i : i = InStr(fixhex,"%")
While (i > 0)
s1 = Mid(fixhex,i+1,2)
If IsHex(s1) Then
d1 = HexToDec(s1)
s1 = Left(fixhex,i-1)
s2 = Mid(fixhex,i+4,2)
If (Mid(fixhex,i+3,1) = "%") And (IsHex(s2)) Then
d2 = HexToDec(s2)
b1 = DecToBin(d1)
b2 = DecToBin(d2)
If (Left(b1,3) = "110") And (Left(b2,2) = "10") Then
b3 = Mid(b1,4)&Mid(b2,3)
s2 = Chrw(BinToDec(b3))
s3 = Mid(fixhex,i+6)
Else
s2 = Chrw(d1)
s3 = Mid(fixhex,i+3)
End If
Else
s2 = Chr(d1)
s3 = Mid(fixhex,i+3)
End If
fixhex = s1&s2&s3
End If
i = InStr(i+1,fixhex,"%")
Wend
Decode=Replace(fixhex,"'","'")
End Function
Re: iDate Added 1.5 - Updated 23/01/2008
Thanks again, I'll look at adding this into the next version. I'm glad you found the script useful.
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.
-
- Posts: 35
- Joined: Mon Apr 07, 2014 2:59 pm
Re: iDate Added 1.5 - Updated 23/01/2008
Having some further experience with the script I noticed that with the option for adding the track if not found, the date added in MM was not the one in the iTunes xml but the current date/time. I also noticed that running the script a second time caused the expected date added values to be written to the MM database. I think this may be due to when itm.UpdateDB is called MM creates a new record with the current date/time, overwriting the desired input value. Running the script a second time causes the record to be updated with the correct value. To avoid running the script a second time to get the correct date added values you can call itm.UpdateDB before the desired date added date is written and then call it again at the end to update the record with the correct date added.
This is only a issue if using the script to add tracks not in MM, not applicable when updating.
This is only a issue if using the script to add tracks not in MM, not applicable when updating.
Re: iDate Added 1.5 - Updated 23/01/2008
I think this must be caused by a change of MM behaviour as this used to work, but I've added it to my list to fix in the next version.
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.