fixing iTunes duplicates
Although I think iTunes is pretty awful, I still keep my music library on a MacMini because it’s small and quiet. Unfortunately, iTunes manages to duplicate songs massively. I didn’t like the existing solutions for trying to deal with this because they might result in the loss of tracks. My solution has been to write a simple Python script that just prepends “[D]” to the album name of duplicate tracks. This neatly separates out the duplicates but doesn’t result in the loss of any data. Here’s the script (you need Python appscript, which takes just a minute to install using “python setup.py install”).