Log in

No account? Create an account
   Journal    Friends    Archive    Profile    Memories

Perl and music silliness - RonO's Ramblings — LiveJournal

Apr. 21st, 2007 09:59 pm Perl and music silliness

For some time, probably over two years, I've kept a backup of my iTunes library on my Linux box -- both as a backup, especially of purchased and downloaded contents, and to make it accessible to Tara's machine when mine isn't up.

To do this I wrote a Perl program that I manually run when I've made updates to my music. The way it used to work was that it would compare the files on my Windoze box with the backup on my Linux box, and if the Windows version was newer, or if there was only a version on Windows, it would copy it to my Linux box. I used Perl's fileinfo function to check which file was more recently modified.

Tonight I went to do a backup at the same time I was syncing some new stuff to my iPod. I noticed that my iPod was getting updates on several hundred songs (earlier in the day I'd changed the genre on a lot of my Christmas music to keep it out of my "Jazz/Vocal" automatic playlist) but the program on the Linux box was only adding the two albums I'd just ripped.

It turns out that on windows, the date stamp wasn't getting changed when other information, such as the genre and artwork, was updated, so none of these files were updated on the Linux computer. I had to redo my program to also do a cmp on both versions of the files, and if it shows a difference do an update. I just hope that now they won't all show a difference in timestamp and start being updated every time.

At this moment, I'm copying a very large percentage of my music between the machines, hopefully not all of it, so I cannot shut the windows machine and go to bed.

I think in the last day or so, I've made the writing on the back of my iPod even more appropriate. When I got it I had it inscribed with "Ron Oakes' very ecletic music collection." (Just now I discovered that I misspelled "eclectic" when I ordered it). For the most part I've had it loaded with a mix of Contemporary Christian Music, mostly pop, and praise and worship -- which can sometimes be very hard to tell apart -- and secular pop, rock and some jazz. Last night while having several free songs (thanks to renting from Avis on our recent vacation) to use up, I went in search of more stuff to download. I ended up downloading stuff by Mussorgsky, Stravinsky, Ellington and Miller (Duke and Glenn respectively). Tonight I added two albums by ELP that I'd never gotten around to ripping ("Works, Volume I" and "Pictures at an Exhibition" -- both of which have more classical then rock on them).

Of course, when I think about it, had loaded Charlie Parker, Dave Brubeck, George Benson, and other stuff composed by Stravinsky before, as well as a couple of other ELP albums, so maybe this doesn't make my collection that much more eclectic after all.

2 comments - Leave a commentPrevious Entry Share Next Entry


Date:April 22nd, 2007 11:37 am (UTC)
rsync wouldn't have worked?
Date:May 4th, 2007 02:53 pm (UTC)
I'd never come across rsync before. I've updated my program to use rsync instead of my home-brew solution. It is working very well now. Thank You