Tuesday, September 22, 2009

iTunes 9 and an Algorithm Update

I've been using iTunes 9 since it came out and recently I've been trying to get it to create duplicates like the previous versions did. It seems at least that iTunes is much smarter about songs that are already in your library and basically seem to stop duplicates from happening; however, I did find that songs you place in the "Automatically add to iTunes" folder will create duplicates if the song is already present. I'm not sure if that is by design or not, but in the end iTunes seems to be better at preventing duplicates from occurring.

What about duplicates that were already present?
iTunes doesn't do anything for those, it still treats previous duplicates as seperate songs and so are added to the library. So for me, the 220 or so actual duplicate songs that were already in my library are still there.

I also made an obvious change to the search algorithm. The algorithm used to scan every file in all the folders of a parent directory adding each one to an ArrayList, then duplicates would be found by comparing each file to every single file in the list. This was a long process and required a lot of computer resources. Instead, the algorithm still scans each directory under a parent directory, but gets the list of files only in one folder compares those files for duplicates, and then moves on to the next folder and checks that one folder for duplicates. This has the advantage of finding duplicates as the folders are searched rather than reading every directory first and then comparing every single file to each other. This works because as iTunes keeps folders organized, there is no way that duplicate song will end up anywhere but in the same folder as the original.

I'm still planning on releasing the program here real soon. I have decided that it will be free. I have placed a button for donations on the program and on this blog, if you are feeling generous, I could use a cup of coffee every now and then! I will also post a video on youtube on how to use the program. I'm hoping to do this this week.


No comments:

Post a Comment