iDate Added 1.5 - Updated 23/01/2008

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Re: iDate Added 1.5 - Updated 23/01/2008

Postby sshaikh » Tue Jun 15, 2010 11:42 am

I used this script to transfer across playcounts, ratings, play date and adddate - All I needed to finally uninstall iTunes. Thanks a lot!
sshaikh
 

Re: iDate Added 1.5 - Updated 23/01/2008

Postby pioniergeist » Thu Feb 23, 2012 10:52 am

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?
pioniergeist
 
Posts: 4
Joined: Thu Feb 23, 2012 6:34 am

Re: iDate Added 1.5 - Updated 23/01/2008

Postby lukesed » Fri Feb 08, 2013 4:42 am

I'm getting the error "Invalid procedure call or argument: 'Chr'" from line 226 of the script. This happens halfway through thousands of tracks.
lukesed
 

iDateAdded error

Postby bdb484 » Tue Aug 27, 2013 12:27 am

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 (viewtopic.php?f=2&t=24445&start=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
bdb484
 
Posts: 6
Joined: Wed Jul 10, 2013 12:31 pm

Re: iDate Added 1.5 - Updated 23/01/2008

Postby trixmoto » Sun Sep 01, 2013 3:29 pm

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 trixmoto.net. If you're interested, check out my Uniface blog.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Image Image
trixmoto
 
Posts: 9961
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Re: iDate Added 1.5 - Updated 23/01/2008

Postby Tyko » Mon Sep 23, 2013 4:57 pm

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.
Tyko
 

Re: iDate Added 1.5 - Updated 23/01/2008

Postby trixmoto » Sun Sep 29, 2013 4:23 pm

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 trixmoto.net. If you're interested, check out my Uniface blog.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Image Image
trixmoto
 
Posts: 9961
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Error #1025 VBScript Compilation Error

Postby BeShakey » Mon May 12, 2014 2:24 am

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
BeShakey
 
Posts: 4
Joined: Tue May 06, 2014 5:52 am

Re: iDate Added 1.5 - Updated 23/01/2008

Postby trixmoto » Mon May 19, 2014 6:44 pm

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 trixmoto.net. If you're interested, check out my Uniface blog.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Image Image
trixmoto
 
Posts: 9961
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Re: iDate Added 1.5 - Updated 23/01/2008

Postby serendip1959 » Sun Jun 29, 2014 12:43 pm

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) :

Code: Select all
  Dim objRE : Set objRE = New RegExp
  objre.Pattern="<string>([a-zA-Z\n\r\.\\0-99)\W])*<\/string>"


and after "Else" in Case 2 'reading track data :

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
serendip1959
 
Posts: 10
Joined: Mon Apr 07, 2014 2:59 pm

Re: iDate Added 1.5 - Updated 23/01/2008

Postby trixmoto » Sun Jun 29, 2014 5:15 pm

Thanks for this, I'll look at adding this into the next version.
Download my scripts at trixmoto.net. If you're interested, check out my Uniface blog.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Image Image
trixmoto
 
Posts: 9961
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Re: iDate Added 1.5 - Updated 23/01/2008

Postby serendip1959 » Tue Jul 01, 2014 3:49 am

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

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,"&#39;","'")
 
End Function
serendip1959
 
Posts: 10
Joined: Mon Apr 07, 2014 2:59 pm

Re: iDate Added 1.5 - Updated 23/01/2008

Postby trixmoto » Tue Jul 01, 2014 4:50 pm

Thanks again, I'll look at adding this into the next version. I'm glad you found the script useful.
Download my scripts at trixmoto.net. If you're interested, check out my Uniface blog.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Image Image
trixmoto
 
Posts: 9961
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Re: iDate Added 1.5 - Updated 23/01/2008

Postby serendip1959 » Mon Jul 21, 2014 9:47 am

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.
serendip1959
 
Posts: 10
Joined: Mon Apr 07, 2014 2:59 pm

Re: iDate Added 1.5 - Updated 23/01/2008

Postby trixmoto » Mon Jul 21, 2014 10:57 am

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 trixmoto.net. If you're interested, check out my Uniface blog.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Image Image
trixmoto
 
Posts: 9961
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Previous

Return to Need Help with Addons?

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 11 guests