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. ;)


Hi - The Download Now Playing Pod for Blog CFC link results in a The page cannot be found? Is there an updated url or how else can I obtain a copy of the file?

Thanks!


Thanks for pointing that out. Here's a download link for the code. This has not been tested in BlogCFC 5 yet though, but should work fine.

http://www.talkingtree.com/blog/downloads.cfm?item...


 

 

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

topics

 
adobe blogging coldfusion computer technology events flex java learning linux mac os x macromedia meetup new england odds & ends outdoors personal photos photoshop science travel video

About This Site

 
Adobe Alumni & Community Professional. Expert in ColdFusion, Flex, LCDS, Photoshop, Lightroom. Linux RHCE. Follow Me!. For my photography check out Boston Portrait Photographer.

Speaker at CF.Objective(): Automated UI Testing with CFSelenium, MXUnit, ANT, and JenkinsCI

Adobe Community Professional (ACP)
Red Hat Linux Certified Engineer

Recent Entries

 
Automated System Testing for ..
Could not find ColdFusion com..
No April Fools: Selenium Ship..

Recent Comments

 
Posted By Steven Erat:
Jim, and anyone else that may attend, if you would like the full slide deck and my demo project files BEFORE the conference, please reply as a comment ...

Posted By Jim Priest:
Can't wait for this one!!

Posted By iPhone Repair:
It appears there are so many people have issue with their iPhone & iPod Touch screens dropped and cracked. It happened to me also when u haven't got a ...

recently played

 
Mr. Brightside
by The Killers
on Hot Fuss
Get Hot Fuss by The Killers on Amazon

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 (437)
RSS Computer Technology (51)
RSS Events (26)
RSS Flex (20)
RSS Gadgets (11)
RSS HiTech Industry (16)
RSS Java (26)
RSS Learning (57)
RSS Linux (70)
RSS Mac OS X (23)
RSS Macromedia (27)
RSS Meetup (35)
RSS New England (62)
RSS Odds & Ends (25)
RSS Outdoors (32)
RSS Personal (29)
RSS Photos (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)

RSS

 


Add to Google
Add to My Yahoo!

Credits and Stuff

 
BlogCFC - Free ColdFusion Powered Blog Software


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