Duplicate Report 3.0 [MM2+3]

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

Moderators: Peke, Gurus

Skywave
Posts: 22
Joined: Sun Oct 15, 2006 5:40 am

Case Sensitive

Post by Skywave »

Hi TrixMoto

Again... Awesome script!!!

But I have come across the problem of Case Sensitivity. I am happy to modify the script to ignore case... but I haven't a clue as to where you do your comparison. :(

I have tried UCase-ing the following line in the CountMatches procedure:

Code: Select all

      If UCase(arr1(i)) = UCase(arr2(j)) Then
But that didn't work.

Then I tried UCase-ing as in the following example

Code: Select all

  'process list
  For i = 0 To list.Count-1
    Call progtext("Stage 1/5: Item "&(i+1)&" of "&(list.Count)&"...",1)
    Set itm = list.Item(i)
    If done.Item(itm.ID) = "" Then
      done.Item(itm.ID) = "done"
      grp = UCase(itm.Title)
      If MatchTitle Then
        If Right(grp,1) = ")" Then
          Dim pos : pos = InStrRev(grp,"(")
          If pos > 0 Then
            temp = Mid(grp,pos+1,Len(grp)-pos-1)
            If IsNumeric(temp) Then
              grp = Left(grp,pos-1)
            End If
          End If
        End If
      End If
      Select Case MatchMode
        Case 1
          grp = UCase(grp&"+"&itm.ArtistName)
        Case 2
          grp = UCase(grp&"+"&itm.ArtistName&"+"&itm.AlbumName)
      End Select
      temp = grps.Item(grp)
      If temp = "" Then
        grps.Item(grp) = itm.ID
      Else
        grps.Item(grp) = temp&","&itm.ID
      End If
    End If
    If Progress.Terminate Then 
      Exit Sub
    End If
  Next
But that didn't work either... :(

If you could tell me where you do your comparison on Artist, Title and Album, I will modify my script for that and probably post it so that other users can use it until you have V3 (which I am sure will be A LOT better) when MM3 is released (or BETA).

Your help would be appreciated.

Skywave
some1
Posts: 91
Joined: Tue Jul 03, 2007 3:10 am

Post by some1 »

I use this alot!
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

@some1 - glad you like! :)

@Skywave - there's some rather unconventional coding in here, but I blame the datatypes available in VBScript! I think the line you want to amend is line 235...

Code: Select all

temp = grps.Item(grp)
This is where the comparison string "grp" has been built and is checked against the list. So immediately before this line you'll want to do...

Code: Select all

grp = UCase(grp)
temp = grps.Item(grp)
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.
Skywave
Posts: 22
Joined: Sun Oct 15, 2006 5:40 am

UCase-ing

Post by Skywave »

Thanx trix. Works like a charm... :lol:
Guest

Problem with 'Left' in script

Post by Guest »

When I run this script I get an error:

Error #5 - Microsoft VBScript runtime error
Invalid procedure call or argument: 'Left'
File: "C:\Program files\MediaMonkey\Scripts\DuplicateReport.vbs", Line:580, Column:6

Left seems to be a valid call I think, any idea on why it doesn't like it? I'm pretty lame when it comes to VBScript, but to me your code looks right.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

The only "Left" call in this line is that of DateAdded - have you blanked out these values for any reason?
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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Psyker7 wrote:Any chance of getting it to ignore blank titles? (ie unknown titles)
I'm not sure why you'd want to do this. You'd get any tracks in the album, or by the artist (depending on your settings) which have the same length. Maybe adding an option to use track instead of title would be better?
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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (2.1) is now available to download from my website. Changes include...

- Added option to ignore case
- Added match mode of track number, artist and album
- Added option to merge dupes with keeps before deleting

The merge feature will check and if selected, then for any group which has dupes it will try to select a "recipient" track to merge with. If there is a single track in the group with "KEEP" then this will be selected, else if there's no KEEP tracks and a single "AUTO" track then this will be selected. If neither of these is true then a popup box will be displayed with a list of tracks to select.

All fields which are populated on the DUPE but not on the "recipient" will be copied across during the merge. The ratings will be averaged (if not unknown) and the playcounts will be summed. The play history and playlist entries will also be updated to the "recipient" track.
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.
jury01
Posts: 2
Joined: Wed Feb 21, 2007 10:55 am

Post by jury01 »

I'm not quite sure how this V2.1 works in case of merging!? What I need is an option to keep a selected track and to replace the DUPEs with this selected track but to keep the Tags of the DUPEs. Is this already realized? If not, is it possible?

Idea behind: Keep identical tracks for seperate Album Information..
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Well this script does everything except replace the dupe tracks. It can leave them in place if you select "Flag" instead of "Delete" but it cannot replace them so that you have multiple copies.
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.
sommo

Post by sommo »

Thanks for this!
Lon
Posts: 2
Joined: Fri Dec 21, 2007 9:53 am

Remove the Dupe Flag

Post by Lon »

If I flagged some files as "Dupe". How would I remove the flag from the "Custom1" field?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Well if you don't want to do this manually then you could try my Clear Field 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.
Lon
Posts: 2
Joined: Fri Dec 21, 2007 9:53 am

Thank You

Post by Lon »

Thanks for the pointer to the "Clear field" script. Merry Christmas!!!!
Kevinowpb
Posts: 129
Joined: Sat Dec 22, 2007 10:18 am
Location: West Palm Beach
Contact:

script fail... errors sent to . wherever the email sends it

Post by Kevinowpb »

but... wondering if anyone is getting them.

My dup report script ALWAYS crashes..
I get the same error, and the same debug/choose to send error via email.. etc..

Does anyone receive those? Is someone working on the errors that have been sent?

Should I post here?

Using MM 3.0 RC4 1120.. on XP and 2000 same externally networked shared drive with all the same mp3/music. about 18k songs/mp3s.. with a rather large report. It crashes whenever I click on FLAG or DELETE dups button after the report is generated (the bottom of the htm).
Post Reply