Steven Erat's Blog Steven Erat Photography
 
 
Viewing By Entry
 
 

TalkingTree  Now Playing pod for BlogCFC - What's playing on your iTunes?

 

Recently envious of Matt Woodward's Now Playing on iTunes pod on his blog, a blog built with BlogFusion, I investigated what might be involved in producing an equivalent pod for BlogCFC software users.

I read the installation and usage guide for the Now Playing plug-in, available for a small charge from Brandon Fuller, and it seemed very easy to setup in iTunes. I logged into PayPal, bought a Now Playing license, and immediately received my key in the mail. The plug-in for Mac has few features than the one for Windows by the way. I think he will implement the Mac features in the not too distant future tho.

The plug-in will upload a small xml file called now_playing.xml to a specified directory on your FTP server where your ColdFusion server and blog reside. For each song played, the now_playing.xml file is uploaded with the metadata associated with the song currently playing. If the song has an artwork image associated with it, that image is also uploaded.

To display the song on my blog, I had to write a pod for BlogCFC that would not only parse the the now_playing.xml file to display info like the song name, artist, and album in the pod, but I also had to design a way for the pod to behave efficiently so as to minimize the number of times it reads the timestamp on now_playing.xml and parsing the file only if the pod detects that the file has been updated.

So you can see to the left that the Now Playing pod for BlogCFC is being used here. A few assumptions are made for efficiency, and they are configurable in the code. The pod assumes by default that it should only check for a new file after at least 3 minutes have passed since the last time it checked, which I estimate to be an average running time for a song. After 3 minutes it will check the timestamp for every page request until the now_playing.xml file has been updated or until the default max value of 60 minutes where the pod goes into a kind of sleep mode where it assumes that you have stopped playing iTunes. There's also a snooze feature that really kicks in after 60 minutes and will then wake up to check for a new file only once every 5 minutes by default, waiting for you to start iTunes again.

The pod usage is described in the comments, but all you have to do is save the pod cfm file to the {blog_root}/includes/pods/ directory and create a new directory {blog_root}/nowplaying/. Then configure your iTunes plugin to upload to {blog_root}/nowplaying/. The additional directory is recommended because if the song has artwork the image is also uploaded, so its better put all that in their own directory.

Please check it out and report and problems to me. So far I think I've ruled out any glaring problems, but you never know.

Download Now Playing Pod for BlogCFC

 


Comments

Great minds think alike. I posted a pod a couple weeks ago, although not as elaborate:

http://www.tom-muck.com/blog/index.cfm?newsid=119


Hey, that's cool. I didn't see a pod for it on the BlogCFC forums. As always, I enjoy a good coding problem so even if I sometimes reinvent the wheel at least i was fun and exercised my skills.

Funny we both wrote one because we were envious of someone elses :)


Very cool work! Now I just got to find a way to add more pods and not take up as much space. ;)


 

 

Calendar

 
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Search This Site

 
This is an exact search only

About This Site

 
I live west of Boston and work as a Software Engineer with ColdFusion and Flex, specializing in Linux. Recently I graduated in Professional Digital Photography from CDIA.
More about me

Recent Entries

 
A ColdFusion Trick for Lost D..
Starting ColdFusion9 Solr: Us..
Adobe LiveCycle DataServices ..

Recent Comments

 
Posted By Aaron Longnion:
Thanks Steven, I just ran into this problem, remembered your tweet about it, and found your blog on it. :)

Posted By srinyvas:
Hai, This information is very useful and i like your excellent writing skill. Can i copy this Content to my website top management colleges ...

Posted By Steven Erat:
@Wade - Glad I could help! Thanks for letting me know it worked for you too.

recently played

 
The Candid Frame #70 - Greg Gorman
by Ibarionex R. Perello
on The Candid Frame: A Photography Podcast

now playing, a plug-in for itunes

Categories

 
RSS Adobe (34)
RSS Bicycling (9)
RSS Blogging (39)
RSS Books (13)
RSS Breeze (13)
RSS CFMX Podcasts (10)
RSS ColdFusion (427)
RSS Computer Technology (51)
RSS Events (26)
RSS Flex (20)
RSS Gadgets (10)
RSS HiTech Industry (16)
RSS Java (25)
RSS Learning (57)
RSS Linux (70)
RSS Mac OS X (22)
RSS Macromedia (27)
RSS Meetup (35)
RSS New England (62)
RSS Odds & Ends (25)
RSS Outdoors (32)
RSS Personal (29)
RSS Photography (111)
RSS Photoshop (29)
RSS Podcasts (18)
RSS Rants (19)
RSS Restaurants (8)
RSS Science (34)
RSS Spain (16)
RSS Travel (42)
RSS Twitter (10)
RSS Video (20)
RSS Webcam (3)
RSS Writing (10)

Blogs I Read

 
Terrence Ryan
Ben Forta
Ray Camden
Kinky Solutions
Dan Vega
Gary Gilbert
Simeon Bateman
Red Hat Blogs
O'Reilly Digital Media
O'Reilly Radar
John Nack
The Strobist
Scott Kelby
Matt Kloskowski
Joe McNally
Digital Photography School
Engadget
Science Blog

RSS

 


Add to Google
Add to My Yahoo!

Aggregated By

 


Consumed By Feed-Squirrel.com
Aggregated by ColdFusionBlogger.org

Credits and Stuff

 
BlogCFC - Free ColdFusion Powered Blog Software
CJM Group - ColdFusion Website Hosting


 
 
blog | photos | flickr | referers | webcam | stats | about | contact
 
Copyright © 2010 Steven Erat. All rights reserved.
This is a personal weblog. The opinions expressed here represent my own and not those of my employer