1
General / Script for deleting duplicates
« on: January 07, 2016, 21:04:16 »
Hi
Just analysed my huge and extremely messy music collection and come up with 18,000 duplicates! Losing the will to live already! I have noticed that if you have several copies of the same album in your collection(as I do) the media servers I use all seem to lump them together. So for example I have 5 copies of Elephant by The White Stripes(don't ask how I don't know). So when I search media monkey for "Elephant" it lists the Album but with 5 of each song included. This means that I cannot play the Album in it's entirity without hearing 5 of each track (unless I select one of each and make a play list).
But some of the tracks on Elephant appear on other albums also, so I probably have 8 copies of some tracks. To let similarity delete all but one track(randomly or by quality) could leave gaps in some of the Albums if it chooses the wrong tracks. So, i have been working through the results of the Analysis looking at which tracks are duplicated AND from the same album and keeping ONLY ONE of the best quality tracks. A simple but tedious process.
It strikes me that this could easily be performed by a (probably) simple script. Problem is, the last time I wrote script was 35 years ago in "basic", if anyone remembers it. I have never used javascript and don't have the first idea how I would write the script to work with Similarity API.
Essentially I think the script would simply be:
IF the "Artist", "Title" and "Album" fields are the same on a given group of duplicate results THEN keep the one with the best rating AND delete the rest.
To save me doing an open university course in computing as I approach my dotage DOES ANYONE KNOW HOW TO DO THIS?
My wife already thinks I am a a specky geek for embarking on my music rationalization project(which has taken up loads of time) and will probably divorce me if I work through 18,000 duplicates in this way, as it will probably take weeks.
Take my advice don't buy multi-room speakers! They work great, but ya music collection needs to be in order!
I would be very grateful for any help or advice.
Just analysed my huge and extremely messy music collection and come up with 18,000 duplicates! Losing the will to live already! I have noticed that if you have several copies of the same album in your collection(as I do) the media servers I use all seem to lump them together. So for example I have 5 copies of Elephant by The White Stripes(don't ask how I don't know). So when I search media monkey for "Elephant" it lists the Album but with 5 of each song included. This means that I cannot play the Album in it's entirity without hearing 5 of each track (unless I select one of each and make a play list).
But some of the tracks on Elephant appear on other albums also, so I probably have 8 copies of some tracks. To let similarity delete all but one track(randomly or by quality) could leave gaps in some of the Albums if it chooses the wrong tracks. So, i have been working through the results of the Analysis looking at which tracks are duplicated AND from the same album and keeping ONLY ONE of the best quality tracks. A simple but tedious process.
It strikes me that this could easily be performed by a (probably) simple script. Problem is, the last time I wrote script was 35 years ago in "basic", if anyone remembers it. I have never used javascript and don't have the first idea how I would write the script to work with Similarity API.
Essentially I think the script would simply be:
IF the "Artist", "Title" and "Album" fields are the same on a given group of duplicate results THEN keep the one with the best rating AND delete the rest.
To save me doing an open university course in computing as I approach my dotage DOES ANYONE KNOW HOW TO DO THIS?
My wife already thinks I am a a specky geek for embarking on my music rationalization project(which has taken up loads of time) and will probably divorce me if I work through 18,000 duplicates in this way, as it will probably take weeks.
Take my advice don't buy multi-room speakers! They work great, but ya music collection needs to be in order!
I would be very grateful for any help or advice.