Duplicate Report 3.0 [MM2+3]
Excellent, I'm glad to hear that!
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.
Well the more tracks you go through the more titles there are to match with so it will get exponentially slower until it finishes. If I have any bright ideas I'll try to speed it up, but it's always going to be a slow process.
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!
You can add this field by opening "DuplicateReport.vbs" in a text editor and amending lines 422 and 650 - you want to add a column for "itm.Path".
You can add this field by opening "DuplicateReport.vbs" in a text editor and amending lines 422 and 650 - you want to add a column for "itm.Path".
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.
Adding SongPath
@Shadrax
If you want to add the Path of the song to the report, change line 651(?) from this:
to this:
Let me know if you need help with this
@trixmoto: maybe you could add this as an option for your next release?
If you want to add the Path of the song to the report, change line 651(?) from this:
Code: Select all
Call fout.WriteLine("<tr id='"&itm.ID&"' name='grp"&i&"' class='"&temp&"'><td><a href='javascript://' onclick='play("&itm.ID&")'>"&MapXML(itm.Title)&"</a></td><td>"&MapXML(itm.ArtistName)&"</td><td>"&MapXML(itm.AlbumName)&"</td><td>"&gettime(itm.SongLength/1000)&"</td><td>"&Int(itm.Bitrate/1000)&"kbps</td><td>"&Left(itm.DateAdded,InStr(itm.DateAdded," ")-1)&"</td><td><a id=""a"&itm.ID&""" href=""javascript:toggle('"&itm.ID&"');"">"&temp&"</a><input id='i"&itm.ID&"' type='hidden' value='"&orig&"'></td></tr>")
Code: Select all
Call fout.WriteLine("<tr id='"&itm.ID&"' name='grp"&i&"' class='"&temp&"'><td><a href='javascript://' onclick='play("&itm.ID&")'>"&MapXML(itm.Title)&"</a></td><td>"&MapXML(itm.ArtistName)&"</td><td>"&MapXML(itm.AlbumName)&"</td><td>"&MapXML(itm.Path)&"</td><td>"&gettime(itm.SongLength/1000)&"</td><td>"&Int(itm.Bitrate/1000)&"kbps</td><td>"&Left(itm.DateAdded,InStr(itm.DateAdded," ")-1)&"</td><td><a id=""a"&itm.ID&""" href=""javascript:toggle('"&itm.ID&"');"">"&temp&"</a><input id='i"&itm.ID&"' type='hidden' value='"&orig&"'></td></tr>")
@trixmoto: maybe you could add this as an option for your next release?
Thanks for your PM, I'll certainly put this option 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.
Some query open
Hi trix
I tried running your script, but I got the 'some query open' error. I took out all my changes (thinking that I might have screwed it up), but it still gives the same problem...
And the offending line of code is.... (drum roll)
Line 773 (of the original release)
Any ideas?
I tried running your script, but I got the 'some query open' error. I took out all my changes (thinking that I might have screwed it up), but it still gives the same problem...
And the offending line of code is.... (drum roll)
Line 773 (of the original release)
Code: Select all
Execute("itm."&KeepField&" = otr.className")
Means SQL transactions are getting their wires crossed, I'll try to get it sorted in the next release. I think it's less likely to occur if you process a smaller number of tracks at a time.
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.
I tried running it with only 4 selected tracks (wanting to delete 2 of them), but it still gives the error.
It says the running queries are "SELECT Id FROM Songs WHERE Id IN (82139, 72930, 49914) ORDER BY Bitrate DESC, DateAdded DESC"
I see that you have that specific query 3 times. Why is that?
Also, I've noticed that you never loop through the datasets returned from Database.OpenSQL, but only take the first record... Isn't there some function that should say "dbit.Close"? Alternatively, why not "SELECT TOP 1 Id FROM ...", and after getting your value, (and checking NOT dbit.EOF), do a dbit.Next? That should close the object...
I will try those, and see what happens.
Just thoughts
Skywave
It says the running queries are "SELECT Id FROM Songs WHERE Id IN (82139, 72930, 49914) ORDER BY Bitrate DESC, DateAdded DESC"
I see that you have that specific query 3 times. Why is that?
Also, I've noticed that you never loop through the datasets returned from Database.OpenSQL, but only take the first record... Isn't there some function that should say "dbit.Close"? Alternatively, why not "SELECT TOP 1 Id FROM ...", and after getting your value, (and checking NOT dbit.EOF), do a dbit.Next? That should close the object...
I will try those, and see what happens.
Just thoughts
Skywave
Fixed it:
The script has to have the 'Set dbit = Nothing' after each of the OpenSQL statements, like below:
Sorry that I can't give line numbers, because my script has been modified. Although those lines should be in the high 600's, or low 700's...
[Edit]Correction. The lines would be high 500's to low 600's[/Edit]
PS. I still think it is an excellent script!!!
Reg'ds
Skywave.
The script has to have the 'Set dbit = Nothing' after each of the OpenSQL statements, like below:
Code: Select all
'select best
Set dbit = SDB.Database.OpenSQL("SELECT Id FROM Songs WHERE Id IN ("&mglist&") ORDER BY Bitrate DESC, DateAdded DESC")
If Not dbit.EOF Then
best = dbit.StringByIndex(0)
End If
Set dbit = Nothing
'select best auto
Set dbit = SDB.Database.OpenSQL("SELECT Id FROM Songs WHERE Id IN ("&aklist&") ORDER BY Bitrate DESC, DateAdded DESC")
If Not dbit.EOF Then
aklist = dbit.StringByIndex(0)
End If
Set dbit = Nothing
'select best from mode group
Set dbit = SDB.Database.OpenSQL("SELECT Id FROM Songs WHERE Id IN ("&mglist&") ORDER BY Bitrate DESC, DateAdded DESC")
If Not dbit.EOF Then
If Left(keep.Item(CStr(dbit.StringByIndex(0))),1) = "!" Then
keep.Item(CStr(dbit.StringByIndex(0))) = "!AUTO"
Else
keep.Item(CStr(dbit.StringByIndex(0))) = "AUTO"
End If
End If
Set dbit = Nothing
[Edit]Correction. The lines would be high 500's to low 600's[/Edit]
PS. I still think it is an excellent script!!!
Reg'ds
Skywave.
Last edited by Skywave on Tue May 27, 2008 1:14 pm, edited 1 time in total.
-
- Posts: 1119
- Joined: Mon Apr 09, 2007 12:03 am
- Location: Boulder, Colorado, USA
Well, I have not used this script for quite some time...
But, second sentence of first post in this thread:
But, second sentence of first post in this thread:
trixmoto wrote: The idea is that you make sure all the tracks you want to process are in the main window, then click "File, Create Reports, Duplicate Report". You will be presented with an options screen...
D Rock
MediaMonkeyGoldv3.0.3.1183
Vista Home Basic|4thGen 20GPod
Zune Small Player Skin w/ Aqua 4 Player Mod
Backup | Last FM Node | Scrobbler DJ | TopTracks | StayInSameStyleDJ
RadioDJ | RadioFreeMonkey | PrettyPictures | MiniLyricsEmbedder
LyricsViewer | Lyricator | LyricsPlugin | VisualizationEmbedder | MonkeyRok
RightClickForWeb | WebSearchPanels | WebNodes | MagicNodes | FavoritesNodes
NowPlayingArtNode |AutoRateAccurate | TaggingInconsistencies
AdvancedDuplicateFind&Fix | CaseModify | PlayHistory&Stats | Etc...
MediaMonkeyGoldv3.0.3.1183
Vista Home Basic|4thGen 20GPod
Zune Small Player Skin w/ Aqua 4 Player Mod
Backup | Last FM Node | Scrobbler DJ | TopTracks | StayInSameStyleDJ
RadioDJ | RadioFreeMonkey | PrettyPictures | MiniLyricsEmbedder
LyricsViewer | Lyricator | LyricsPlugin | VisualizationEmbedder | MonkeyRok
RightClickForWeb | WebSearchPanels | WebNodes | MagicNodes | FavoritesNodes
NowPlayingArtNode |AutoRateAccurate | TaggingInconsistencies
AdvancedDuplicateFind&Fix | CaseModify | PlayHistory&Stats | Etc...
New version (3.0) is now available to download from my website.
This script is now developed by Skywave!
Changes include...
- Added a menu item that will bypass the user interface and use the options from the last run
- Added header strip will change colour if you have clicked on any of the flags in that group
- Added user definable columns include songpath and filename
- Added option to look at duplicate content values instead of tags
- Fixed the 'some query open' error messages (in three places)
- Fixes the progress bar not disappearing after completion or cancellation
- Added option to use either the entire list or the user selection.
Thanks Skywave for all your hard work on this new version!
This script is now developed by Skywave!
Changes include...
- Added a menu item that will bypass the user interface and use the options from the last run
- Added header strip will change colour if you have clicked on any of the flags in that group
- Added user definable columns include songpath and filename
- Added option to look at duplicate content values instead of tags
- Fixed the 'some query open' error messages (in three places)
- Fixes the progress bar not disappearing after completion or cancellation
- Added option to use either the entire list or the user selection.
Thanks Skywave for all your hard work on this new 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.