Sunday, September 20, 2009
I've been updating the program more this weekend. There were a few sizable bugs I found. One of the major ones occurred when the user didn't select every song to be cleaned, rather a few of the songs. Instead of deleting the selected songs, the program would delete the number of selected songs starting from the top of the list. For example, if I picked three songs sprinkled throughout the list, the program would delete three songs starting from the top. In the end it was a minor fix and that portion is working correctly.
I've come across the Swing Worker class in Java. Swing Worker provides a way to utilize threads in the background so that the main gui thread is not bogged down with operations not directly related to the gui. In essence, the program appears to run much faster and smoother. Also a part of the Swing Worker class, the user can now cancel functions and more easily restart searches.
I have also tweaked the algorithm that finds duplicate songs. I still have artist, title, and album matching turned off as it greatly increases the computations. The program does still search filenames that end in iterations though.
Warning messages now appear if selections haven't been made and there are a couple title menu options as well namely, exit and about.
I have named this version currently version .1. I'm not really sure to version conventions, though I know v1, v2, etc are full released versions and everything in between usually refer to minor releases or bug fixes. Basically, I picked an arbitrary number and went from there.
I included a few screenshots, notice the cancel button and the title menus.
I'm looking into logging, to keep a record of what happens. Also a major convience to the program would be to not only remove the file itself but also remove the song from the itunes library, but that's a ways off, as communicating through com's in windows isn't really java's thing. As of now, to the have the library updated, the user has to delete the songs from the library(not from the hard drive) and then reimport the songs, so that iTunes knows exactly what is in the folders. That's all to come and until then...toodles.