Duplicate Title Magic Node that excludes Different album
Duplicate Title Magic Node that excludes Different album
Have Been unsucessful in coming up with a node that will only contain songs with a duplicate title AND album, not just a duplicate title. Any Help would be appreciated.
Songs with same title and album (albumID)
Songs with same title and AlbumName
Havent tested them and they will be slow on big collections. Let me know if they work!
They are now tested but beware, they are slow, especially the second one.
Edit: Corrected code.
Code: Select all
DupsTitleAlbumID|SQL filter: IDAlbum&SongTitle IN (SELECT IDAlbum&SongTitle FROM Songs GROUP BY IDAlbum&SongTitle HAVING Count(Songs.ID)>1)\<Artist>Code: Select all
DupsTitleAlbumName|SQL filter: Album&SongTitle IN (SELECT Album&SongTitle FROM Songs, Albums WHERE songs.idalbum=albums.id GROUP BY Album&SongTitle HAVING Count(Songs.ID)>1)\<Artist>They are now tested but beware, they are slow, especially the second one.
Edit: Corrected code.
Last edited by Bex on Thu Sep 29, 2005 4:52 pm, edited 1 time in total.
-
karltinsly
- Posts: 14
- Joined: Sun Sep 11, 2005 1:51 pm
I tried the second query (the album name one), but I got a SQL error and my MM locked up. When I restarted, the node was still there. When I clicked on the node, MM locked up again, so I restarted and deleted the node. I'm trying the album ID script now -- it's running long, as expected, but didn't throw an error.
Karl
Karl
-
karltinsly
- Posts: 14
- Joined: Sun Sep 11, 2005 1:51 pm
I was unable to complete running the albumID node query. It popped up a message every few minutes to ask if I wanted to continue or end the query. I clicked continue several times over 20 minutes or so, but was in the middle of typing an email when the message popped up suddenly, accepted an 'e' I was typing as an indication to end, and quit. Besides that bit of frustration, the query completely ties up MM and slows everything else on my computer as well.
Is there anyway to add an index to the database to perhaps speed the query up?
Karl
Is there anyway to add an index to the database to perhaps speed the query up?
Karl
Yeah, I've corrected the last code and tested them now and they are just too slow..karltinsly wrote:I was unable to complete running the albumID node query. It popped up a message every few minutes to ask if I wanted to continue or end the query. I clicked continue several times over 20 minutes or so, but was in the middle of typing an email when the message popped up suddenly, accepted an 'e' I was typing as an indication to end, and quit. Besides that bit of frustration, the query completely ties up MM and slows everything else on my computer as well.
Is there anyway to add an index to the database to perhaps speed the query up?
Karl
The db is to my understanding indexed. The very same query is fast when executed directly in Access. Perhaps a hint could be used in the SQL. But my knowledge regarding hints is limited, especially in Access.
How many tracks do you have in MM?
-
karltinsly
- Posts: 14
- Joined: Sun Sep 11, 2005 1:51 pm
Access has very litle in common with Oracle but it does support indexing of individuals columns (not clustered though).
Anyway, the Columns that are in use from those scripts are allready indexed inside Access and in fact the queries are quite fast inside access. So the problem is at the Front-End which i don't believe that was designed to perform such long and intensive queries...
Will give it a shoot though and see what happens
Anyway, the Columns that are in use from those scripts are allready indexed inside Access and in fact the queries are quite fast inside access. So the problem is at the Front-End which i don't believe that was designed to perform such long and intensive queries...
Will give it a shoot though and see what happens
Duplicate Title Magic Node that excludes Different album
I'm fairly new to magic nodes, but could a new field called "TITLE AND ALBUM" Similar to "ALBUM AND ARTIST" be created and then scanned for duplicates?
Ok,
i have tried to solve this Using Magic Nodes and i came to the result that allthough it can be done it is very very slow (especially if you try to expand the node). So, i tried to find a way to force Magic Nodes not to show any child nodes under the DuplicateTitleAndAlbumID node but was unsuccesfull.
This is why i decided to write a small script that will create that node without child nodes. This node is located after the "Files to edit" node.
One more thing i realised is that if a try to pass the whole query using scripting then you have to wait a long time before coming with any results. The same query inside access though is rapid fast!!!
So this is what i propose:
Step 1
Open MediaMonkey.mdb and create a new query, switch to SQL view and paste the following code:
Save this query as Dups
Close Access
Step 2
Create a new text file and paste the following code
Save this file as dups.vbs inside the Scipts\Auto folder
Restart MM, the new node should be after the "Files to Edit Node"
It displays all the Songs that have both the Title and AlbumID the same.
You may also notice that some songs are displayed that althoug they have the same title dont have the same Album. This only occurs if you have files that have the Album Field empty. So for better results i suggest to eliminate those empty fields.
For better readability i suggest to sort the results first by Album and then by Title
Hope it helps,
Cheers
i have tried to solve this Using Magic Nodes and i came to the result that allthough it can be done it is very very slow (especially if you try to expand the node). So, i tried to find a way to force Magic Nodes not to show any child nodes under the DuplicateTitleAndAlbumID node but was unsuccesfull.
This is why i decided to write a small script that will create that node without child nodes. This node is located after the "Files to edit" node.
One more thing i realised is that if a try to pass the whole query using scripting then you have to wait a long time before coming with any results. The same query inside access though is rapid fast!!!
So this is what i propose:
Step 1
Open MediaMonkey.mdb and create a new query, switch to SQL view and paste the following code:
Code: Select all
SELECT Count(Songs.ID) AS CountSongID, Songs.SongTitle, Songs.IDAlbum, Count(Songs.IDAlbum) AS CountOfIDAlbum
FROM Songs
GROUP BY Songs.SongTitle, Songs.IDAlbum
HAVING (((Count(Songs.IDAlbum))>1));
Close Access
Step 2
Create a new text file and paste the following code
Code: Select all
'Find Dups Script
'by psyXonova
Sub onStartUp
Dim Tree ' The main tree
Dim CustomNode ' The Node to be added
Set Tree = SDB.MainTree
Set CustomNode = Tree.CreateNode
CustomNode.Caption = "Duplicate Title and AlbumID"
CustomNode.IconIndex = 40
CustomNode.UseScript = Script.ScriptPath
CustomNode.OnFillTracksFunct = "FillDupTracks"
Tree.AddNode Tree.Node_FilesToEdit, CustomNode, 1 ' Add as the last child
End Sub
Sub FillDupTracks(Node)
Dim Tracks
Node.HasChildren = False
Set Tracks = SDB.MainTracksWindow
Tracks.AddTracksFromQuery("AND IDAlbum IN (SELECT Dups.IDAlbum from Dups) AND SongTitle IN (SELECT Dups.SongTitle FROM Dups)")
Tracks.FinishAdding
End Sub
Restart MM, the new node should be after the "Files to Edit Node"
It displays all the Songs that have both the Title and AlbumID the same.
You may also notice that some songs are displayed that althoug they have the same title dont have the same Album. This only occurs if you have files that have the Album Field empty. So for better results i suggest to eliminate those empty fields.
For better readability i suggest to sort the results first by Album and then by Title
Hope it helps,
Cheers
-
karltinsly
- Posts: 14
- Joined: Sun Sep 11, 2005 1:51 pm
-
rovingcowboy
- Posts: 14163
- Joined: Sat Oct 25, 2003 7:57 am
- Location: (Texas)
- Contact:
i am not sure where to put these codes ? do make them work can you tell me where to put them at in media monkeys folders?
and also
i keep thinking every time i see one person say they got one then running but the other person says they did not get it running, that maybe some one is low on ram? or virt memory. or both?
so do you that have not got it running have loads of ram? and virt memory? as i am low on both and if you have lots of ram and it still don't work then maybe it wont work on mine either?
and also
i keep thinking every time i see one person say they got one then running but the other person says they did not get it running, that maybe some one is low on ram? or virt memory. or both?
so do you that have not got it running have loads of ram? and virt memory? as i am low on both and if you have lots of ram and it still don't work then maybe it wont work on mine either?
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
psyxonova, great work!
I've been thinking about something like this for a while. But my idea was to create Access Queries as substitutes for the SQLfilters used within Magic Nodes so it'll be faster.
I also have some ideas on different ways to find duplicates wich involves some advanced query techniques. I'll give it a go and let you know the result.
I've been thinking about something like this for a while. But my idea was to create Access Queries as substitutes for the SQLfilters used within Magic Nodes so it'll be faster.
I also have some ideas on different ways to find duplicates wich involves some advanced query techniques. I'll give it a go and let you know the result.
Duplicate Title Magic Node that excludes Different album
I do not possess Access. Is there any other way to add the query?
Re: Duplicate Title Magic Node that excludes Different album
Not that I know of...mdave13 wrote:I do not possess Access. Is there any other way to add the query?