dougscripts.com

How I Display "Doug's Listening To..."

Occasionally I switch on my "Doug's Listening To..." thingy that displays in the upper left-hand corner of my site:



It's VERY complicated how I get this to go. Here are the essentials.

Essence

The whole thing is based on a Stay-Open AppleScript that grabs the current track info. The grabbed info includes the track name, artist, album, rating, kind, database id, and artwork. Two files are FTP'd from my computer to my server. First, a text file that contains text info about the track (including HTML and CSS stuff which is assembled by the script) and second, the album artwork file. Meanwhile, my website's template includes some code that enables these files to be displayed. When there is something there it displays the header text (the "Doug's Listening To..." box), the track info text, and the artwork; the AppleScript sends blank data when it has been quitted or when I am not playing something, so then nothing is displayed.

Additionally, I have included code in my AppleScript that can differentiate among iTunes tracks, video tracks, and radio stream tracks. In each of these cases, a special HTML glyph is displayed on my website. The HTML glyphs I use are ♫ (♫) for iTunes audio tracks, (☢) for radio and stream tracks (radioactive, get it?), and (✇) for movie and video tracks.

I show the stars a song is rated by doing the computation rating div 20; 20 equals one star. I use the glyph ★ (★) for stars.

And finally, all this stuff has to be sent to my server using my proprietary username and password, and my site has to be set up in such a way so as to expect the two files.

Whew! See what meant about it being VERY complicated?

Why Can't YOU Do This?

I'd love to make my Stay-Open AppleScript available so that other people can use it to display their currently playing iTunes tracks on their website. Regrettably, as of this writing, it requires so much customization that it would be infeasible for me to support it. Don't think that doesn't matter. You release a script and people expect support. It is my hope to have an easily customizable version of my script available at some point. You wouldn't believe the email I get about this ;)

Site contents © 2001 - 2019 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not interrupt the one doing it.