onAirNow

A »Now Playing« Plugin for WordPress

onAirNow is a WordPress plugin for displaying information about your currently playing song on your blog. It reads the track information from a file and displays it where you want it to appear (usually your sidebar).

I’m using it on my website since a few days and it’s really great and easy to use. Ben Turgeon

You can add the onAirNow output to every part of your blog. I prefer the sidebar as it is a common place for this kind of information. You can see how onAirNow may look on my sidebar. It works out of the box with the WordPress default themes and maybe your theme, too. It even supports WordPress Widgets!

Requirements

  • WordPress (tested with versions 2.0.4, 2.1+, 2.2+ and 2.3+)
  • FTP access to your blog’s server
  • a music player like iTunes or Winamp
  • a client program to upload the information about the currently playing song

Hi, thanks for the great plugin. I’ve integrated a plugin to my mIRC mp3 player to create and upload the file. This is just what the doctor ordered! Great stuff! Perfect! billythekid

You’ll need a client-side program which can upload a customly formatted file with the needed information via FTP to your blog. There are many programs like this as a plugin for your music player or a stand-alone program. Have a look at programs like Now Playing (by Brandon Fuller; onAirNow works out of the box) or Recent Tunes for iTunes (OS X), Now Playing (by Nevala) or Do Something for Winamp and AMIP for mIRC (supports many different music players). An AppleScript for Mac OS X to upload the song information is bundled with the onAirNow download. The script works best when used together with Quicksilver or any application which launches it after a certain key combination was pressed.

Adding onAirNow to Your Blog

I was able to do a much more elegant solution with onAirNow. David Goldstein

Download the ZIP file and unpack it. Upload the included onAirNow/ folder to your blog’s /wp-content/plugins/ folder and activate the plugin from your admin panel. onAirNow adds its own options page and also information about the currently playing song to your dashboard and below your username (you can switch this off).

Once this installation is done and if your WordPress theme supports widgets you can skip the step of adding code to your theme. Just go to the Presentation tab and choose Sidebar Editor.

If you’re not using widgets you can add the following code to your blog’s sidebar or wherever you want the track information to appear:


You may need to surround the above code with

  • tags (or insert them inside the if-statement) if you want onAirNow on your sidebar. It depends on the theme you are using. Take a look at how other functions are inserted in your sidebar.

    Uploading the Track Info File

    Upload a file named onAirNow.track (default file name, configureable) with information about artist and title and optional album, track number, year, song length, cover URL and filename to the plugin’s upload directory at /wp-content/plugins/onAirNow/onAirNowUpload/ by using the program which gets the information from your music player. The uploaded file must be readable by your web-server process.

    It is wise to create a separate FTP user with access to just the onAirNowUpload/ directory.

    The file format is as follows (make your client-side program generate such a file):

    ARTIST_NAME
    SONG_TITLE
    ALBUM_NAME
    YEAR
    TRACK_NUMBER

    COVER_URL
    FILENAME

    (SONG_LENGTH has the format HH:MM:SS, MM:SS or just seconds.)

    If for some reason you can’t upload such a pseudo-XML file there is another possibility. If no or incomplete track info was found inside your track info file a user-provided pattern will be matched against the provided song title, the filename (if provided; without the path) and the contents of the whole track info file (in this order until the track info is complete) to extract the information. This is useful if you are streaming music and you have only the song title containing all info or ID3 tags are missing and your music player can only provide the filename.

    A possible pattern is: {[%n]} %a - %t {(%l {- %y})}{.%e}
    Strings that work with this pattern include:

    • [03] Artist – Song (Album – Year).mp3
    • [03] Artist – Song (Album – Year)
    • [03] Artist – Song (Album)
    • [03] Artist – Song
    • Artist – Song (Album – Year).mp3
    • Artist – Song (Album).mp3
    • Artist – Song.mp3

    Play a bit around with this pattern matcher until you find what you need and be sure to report any problems!

    To tell onAirNow that currently no song is playing just make your uploading program send an empty file to your server or let it write to onAirNow.track. If this isn’t possible on your setup you can tell onAirNow to consider the uploaded information outdated after a specific period of time. If a timeout is set, onAirNow tries to read the song length first and uses the user-set timeout as a backup in case the song length is not specified.

    Users of Apple computers may need to check the “Mac User” option on the plugin’s options page if their program uploads MacRoman formatted files. You’ll notice this when characters like “äÖ懛” are not displayed at all or substituted with a wrong character.

    Customize the Look of onAirNow

    Inside this plugin’s directory there is a file named onAirNow.css. You can copy it to your theme’s directory (then it is used instead of the default) and customize the look of the onAirNow inserted text. The actual content is editable on the options page. You can also toggle the display of the album name and the cover art (its URL must be set inside the tag).

    onAirNow: album name on an extra line

    You can change the appearance of onAirNow by editing the CSS in onAirNow.css. The CSS file is documented so it should be easy to customize.

    The text or HTML which should be displayed when you don’t listen to music can be configured on onAirNow’s options page, too. You can also decide whether you want nothing to be displayed during an idle music player.

    Support/Feedback

    Please leave a comment on this page to provide feedback and suggestions or ask for help. But keep in mind that I do this in my spare time so don’t expect me to answer your questions immediately. Please report bugs via the contact page.

    I’d also like to hear from everyone who has integrated this plugin into their blog. Just leave a comment with your URL!

    Disclaimer

    This plugin is provided as is. Though I did my best to produce a plugin of good quality I can’t guarantee that this plugin is safe, secure or error free. Use it at your own risk and always make a backup copy of your blog before trying new plugins or themes!

    Download

    Download this plugin as a ZIP file, unzip it and copy the onAirNow folder to your blog’s plugin directory.

    Download onAirNow 1.8

    Release Notes

    onAirNow 1.8 (29th July, 2007): changes since version 1.7f

    • Fixed the CSS inclusion code: the plugin’s directory can now be renamed to something different than “onAirNow”.
    • Song length can now have the format hh:mm:ss, mm:ss or just seconds.
    • fixed the timeout logic
    • Delayed timeout by 5 seconds to give the track info a chance to be updated in case of any delay (media player, upload, server).

    onAirNow 1.7f (fix-release) (1st March, 2007): changes since version 1.7

    • Fixes a bug which prevented the removal of the title link

    onAirNow 1.7 (28th February, 2007): changes since version 1.6

    • some CSS tweaks
    • Control panel quick link fixed in WordPress 2.1

    onAirNow 1.6 (never released): changes since version 1.5

    • Added an option to display the song info only on the homepage.
    • Added widget support so there’s no need to add code to your theme’s PHP files. (thanks David Goldstein)
    • Added a link to my onAirNow page through the “On Air Now” title. Thank you for leaving it there!
    • some CSS tweaks (line-height)

    Read older release notes on the next page…

    [Next page]

  • 70 Responses to “onAirNow”

    1. Marco Raaphorst says:

      That might be really nice. I am a foobar2000 addicted person, so hopefully someone will be able to make a DLL for foobar. Would be great!

    2. (post author) Daniel says:

      To clarify things: onAirNow doesn’t support any media player in particular. It’s up to you to find a music player plugin which is able to upload the required file with the track info. If foobar2000 supports this, onAirNow is compatible!

    3. Trackback from BloggingPro China » Blog Archive » WordPress Plugin: onAirNow

      [...] onAirNow,在侧栏显示当前本地正播放的音乐详细。 player playlist sidebar [...]

    4. robyn says:

      i’m attempting to put this on my blog and am running into a few problems. i’m using Mac OS X and have installed Recent Tunes and have uploaded and activated the onAirNow file to my blog…but nothing that i have done has made it work (it just says “no track is currently playing” or whatever. if anyone can help me get all of this figured out, i’d really appreciate it. thanks!

    5. (post author) Daniel says:

      Make sure (by using a FTP program) that the file containing the track info is uploaded to “/wp-content/plugins/onAirNow/onAirNowUpload/onAirNow.track“, contains the correct information and is readable by your web-server process. The directory “onAirNowUpload” needs permissions of 755. Set the correct permissions and try again.
      Also make sure RecentTunes is configured correctly.

    6. Trackback from From Song Displayer to onAirNow « A Whole Lot of Nothing

      [...] While I was configuring Now Playing to work with my Song Displayer setup I noticed a link on the bottom of the page for a WordPress plugin called onAirNow. onAirNow is more advanced yet easier to use than Song Displayer. It has an options page in the WordPress Admin section as opposed to having to change options directly in the code as you have to do with Song Displayer. [...]

    7. Trackback from This Blog Right Here

      [...] After my attempt at upgrading to WordPress 2.0 on my own, all the code modifications I had made freaked it out and the admin side wouldn’t let me in anymore, so this is our fresh new start. I’ve been messing with some new plug-ins that I hope to have up and running soon (a cool one being onAirNow) [...]

    8. Lendell Ray says:

      Hi, I’m using the Nowplaying plugin for iTunes which creates in XML tag which is the album artwork. How can I make onAirNow read the album art tag and display it.

    9. (post author) Daniel says:

      Lendell, it’s implemented. Though testing is still to be done. You should have received a beta version via e-mail.

    10. Ronald says:

      I am trying to get this working with winamp and Dosomething, but all it does is upload an empty onAirNow.track to my server. I’ve looked through all the documentation, but can’t find what I am doing wrong. Help!

    11. (post author) Daniel says:

      Ronald, an empty onAirNow.track file means that your media player plugin for uploading has the problem. I’m glad you could fix it yourself!

    12. Ronald says:

      Yes I fixed it, see: http://www.popindekop.nl

    13. Trackback from hello, sputnik » Surrounded by brokenness.

      [...] I’ve settled (for now) on the WP-iTunes plugin to display what’s currently playing in iTunes. I started using onAirNow in conjunction with the Now Playing iTunes plugin. They worked very well and were easy to set up. But the developer of Now Playing wants to be compensated for his work (which is understandable and respectable) and I was sure I could find another solution that didn’t cost a dime. [...]

    14. Dave says:

      Can you show an example of how to use the image tag? I have many MP3s with cover art embedded in them. Can I get these to show with oAir?

    15. (post author) Daniel says:

      You have to provide the URL of the cover art. That is your media player plugin’s job. Just surround the URL with and in your onAirNow.track file.

    16. Dave says:

      That doesn’t make sense to me. I have many MP3s that have cover art embedded in them. I have never seen a URL for this purpose. This is actually the first time I’ve ever heard of a URL for this purpose. Can you explain more about this or point me to a site with some helpful info?

    17. (post author) Daniel says:

      You can’t use the embedded cover art. An iTunes plugin like Now Playing fetches the URL to the cover image from Amazon and returns it so you can display it on your blog (like onAirNow does).

    18. Dave says:

      OK. I see what you’re saying. I’m trying to get this working using the Now Playing plugin for Winamp (http://people.cc.jyu.fi/~ltnevala/nowplaying/) but not having much success. I’m getting the album art in the plugin but it’s not writing a proper URL into the upload file. But I’m working on it.

    19. Dave says:
    20. Dave says:

      I figured out that last part (make the album cover link to the product page on Amazon using my Amazon Associates ID). To implement in this plugin will require another additional option (to hold the Amazon Associates ID). I set the link to open the product page in a new browser window (or tab in tabbed web browsers) so that when the person browsing closes the product page they will be right back on my blog.

      I have it working on my website right now with hard coded values for the options instead of the options I’ve mentioned in this comment and my last comment.

    21. (post author) Daniel says:

      Hi Dave!
      I remember you, of course. Thanks for all the feedback and ideas for improvements. It’s really nice to see when people care about the stuff I code in my free time.

      I’ve already thought about implementing the Amazon cover lookup and it’s good to see it working :-)
      I’ll take a look into it when I have some time on my hands.

      Thanks again!

    22. Dave says:

      I had a small problem with my version of onAirNow with album cover art support. In my ID3 tags I add a disc number in the album tag for albums that have more than one disc. I do this by adding “(Disc 1)” without the quotes but with the parenthesis to the end of the album tag for tracks from the first disc, “(Disc 2)” for tracks from the second disc, etc. This prevented these albums from showing cover art because, for example, there is no such album called “The Wall (Disc 1)” by the artist “Pink Floyd”. So I added a filter to remove the added text from the tag so the lookup can work properly.

    23. Dave says:

      I have created a WordPress plugin that creates a sidebar widget for onAirNow. If you are running the Sidebar Widgets plugin and a widgetized theme (as well as Daniel’s onAirNow plugin) this plugin allow you to add onAirNow to your sidebar by simply dragging and dropping a widget in the admin panel (instead of manually adding PHP code to your theme). I have not made this plugin available on my website yet but will do so shortly.

      Daniel – Email me if you’d like me to send this to you.

    24. Trackback from 9lb hammer»Blog Archive » Not forever, just for now

      [...] Changed the plugin used for updating the current song playing in Winamp from NowPlaying to onAirNow. This was done primarily because the old plugin just stopped working. [...]

    25. (post author) Daniel says:

      It’s been a while since the last update but I hope to release the next (widgetized) update soon. Currently my hard drive is breaking and my MBP is going to be repaired.

    26. Trackback from Julius Sison » Blog Archive » Audio Plugins for WordPress

      [...] onAirNow [...]

    27. Trackback from onAirNow Widget Now Available « A Whole Lot of Nothing

      [...] Widget Now Available I’ve written before about a plugin called onAirNow. It’s a WordPress plugin that displays information about the song you are currently listening [...]

    28. Trackback from Weblog Tools Collection » Blog Archive » WordPress Plugin Releases for 3/01

      [...] onAirNow gets information about your currently playing track from a file uploaded via FTP and displays it on your blog. [...]

    29. Trackback from WeblogToolsCollection Español » Blog Archive » Plugins de WordPress publicados 1/3

      [...] onAirNow obtiene información acerca de una canción que estas escuchando actualmente, que ha sido cargada via FTP y la despliega en tu blog. [...]

    30. Dave says:

      A quick critique of version 1.7:

      – Making the title a link changes it’s color and makes it clash with the rest of the titles in my sidebar. I have tried to remove the link (both in the options page and the PHP) but have been unsuccessful. I don’t mind the link but if it’s changing the look and feel of my blog then I want it gone.

      – The options page doesn’t discuss how to add the widget (it only describes how to add the code to the template).

      – The Amazon album art lookup and linking feature we discussed is not included. I had to add it manually. Not a big deal.

    31. (post author) Daniel says:

      Hi Dave,

      widget support is mentioned on the options page, but only briefly. I’ve added a hint to look under Presentation / Sidebar Widgets and also added the description to this site (don’t know why I forgot this).

      onairNow 1.7f fixes the bug which prevented the removal of the title link. I’ve only checked and noticed the link was removed on the options page, never actually looked at my blog without the link and then instantly added it again. Sorry! The link is only added as the default title for new users, now.

      I’ll look into the Amazon album art lookup for the next release.

    32. Trackback from Plugin: Display “Now Playing” Song | Wordpress Tutorials And Blogging Tips

      [...] On Air Now is a simple plugin which displays the track title and artist name of whatever you are currently listening to on your blog. The look of the plugin is completely customisable to show what you want to display (e.g. track number, title, artist, album etc.) and how you want it to be displayed, via CSS. [...]

    33. Trackback from WeblogToolsCollection DE » Blog Archive » WordPress Plugin Veröffentlichungen am 3.1.

      [...] onAirNow zeigt Informationen über den gerade laufenden Song über eine via FTP geuploadete Datei an. [...]

    34. Trackback from joszijnsite » Musiks!

      [...] heb ik dat niet allemaal zelf ineengestoken. Ik heb gebruik gemaakt van onAirNow, van WordPress Widgets & van DoSomething – gij kunt het dus [...]

    35. FLAViEN says:

      Hello Daniel greetings from China!

      Thanks for the great plugin, one question: When I play music in Winamp with the Advanced mIRC plugin it generates an onAirNow.track file in my system’s default text encoding which is gb2312, after uploaded to the specific folder of my WordPress installation those Chinese characters(song titles, artist names…) in .track filecould NOT be read correctly.

      Could you give a bit advice on how to set encoding for onAirNow so it may read a non-Western contented .track file?

      Thanks in advance, please foward me an email of your reply also.

    36. (post author) Daniel says:

      Hi FLAViEN, I’ve replied to your question/issue via e-mail. I’ll have a look at it and when (if) resolved it will be provided with a new release of onAirNow.

    37. Trackback from WordPress Plugins for March 27, 2007 « designcreatology

      [...] onAirNow gets information about your currently playing track from a file uploaded via FTP and displays it on your blog. [...]

    38. Pi says:

      Hi, I’m trying to use Now Playing 2.1.2 for WinAmp to feed the info to onAirNow. While I save the information in the same way that onAirNow expects it, I’m having trouble with certain songs. For some songs it says that nothing is playing, although the info is there. For these songs, the options page says that either nothing is playing, or the file doesn’t have the information “correctly formatted”. I’ve tracked it down to delete the time value from the onAirNow.track file for these songs. If I alter the update script to not output the time, all songs work, when it outputs the time, some work, but mostly dont. I am thinking that it might be that the time is not formatted in a way that OAN expects. Now Playing outputs time as HH:MM:SS. Times like 00:08:21 work, but 00:02:27 makes OAN think that the file is badly formatted. Any ideas?

    39. Pi says:

      Hi again, I discovered where the error was. OAN wants MM:SS, without the hours. Parsing the time made OAN think that the file was already played, thus equal to idle. I’m converting the time to seconds, as OAN accepts that too. I think you should put these things in the documentation: the time should be in MM:SS or SS format, and the filename shouldn’t contain path information to be parsed correctly if other information is missing. When I feed OAN with full path & filename, the artist is always something like D:\whateverpath\artist ^_^ Still it’s a great plugin, thanks for it.

    40. (post author) Daniel says:

      Thanks for the feedback Pi!
      I’ve changed the documentation to reflect this.

    41. Pi says:

      I have yet-another little request for next OAN release: please don’t use camel caps with the file names! Most servers are pesky with case. Following all the other folders, I changed the name of OAN’s folder to ‘onairnow’. That made OAN fail to load the CSS, because you includes caps in the absolute file name of the CSS. Btw, using an absolute path for pointing to the CSS is not such a good idea… For me it didn’t work ^_^ Maybe you should rewrite the CSS detection and inclusion code.

    42. (post author) Daniel says:

      Fixed! I don’t know why I didn’t ask WordPress for the plugin’s directory as I do now in the first place.
      I’ve also added support for the song length to be HH:MM:SS, MM:SS or just seconds alongside some other changes you’ve suggested. The next release will follow soon.

    43. Trackback from Audio plugins for WordPress

      [...] onAirNow  [...]

    44. Trackback from Blog & WordPress » Audio plugins for WordPress

      [...] onAirNow [...]

    45. Angel says:

      Are there any walkthrough’s on how to configure AMIP to work with this, I could really use one.

    46. (post author) Daniel says:

      Hi Angel,

      I’m not using AMIP and currently don’t have the time to try it. Maybe the AMIP configurator manual has some useful inofrmation.

    47. Trackback from WP Plugins DB » Plugin Details » onAirNow

      [...] Visit [...]

    48. Martino says:

      Hi! Thanks for this plugin. Really useful.

    49. Trackback from 50+ WordPress Plugins for Multimedia

      [...] onAirNow – Now playing plugin that displays most recent song from iTunes or WinAmp. [...]

    50. Trackback from 50+ Plugins de Wordpress para Multimedia « Quest’s Blog

      [...] onAirNow [...]

    51. billythekid says:

      Hi, thanks for the great plugin. I’ve integrated a plugin to my mIRC mp3 player to create and upload the file. This is just what the doctor ordered!

      Great stuff! Perfect!

      btk

    52. Trackback from billy.the-kid.org » Blog Archive » WP MP3 Player

      [...] Added compatibility for the onAirNow WordPress [...]

    53. Trackback from   50 Multimedya Worldpress plugin by # YaMTaR

      [...] onAirNow [...]

    54. Trackback from 50 plugins para manejo multimedia en Wordpress « COMPU-RECURSOS

      [...] onAirNow – Muestra una lista de lo último que has escuchado en iTunes o Winamp. [...]

    55. Trackback from WORDPRESS GOD:300+ Tools for Running Your WordPress Blog

      [...] onAirNow – Now playing plugin that displays most recent song from iTunes or WinAmp. [...]

    56. Trackback from voozzy.com » Blog Archive » Плагины для WordPress

      [...] список станций, закладки по мелодиям и исполнителям. onAirNow – плагин показывающий самые последние композиции [...]

    57. synthpop says:

      great! recommended.

    58. Trackback from WordPress 收藏 » 让WordPress更加丰富的多媒体插件

      [...] onAirNow – 显示iTunes 或 WinAmp的播放列表 [...]

    59. Trackback from On-line дневник оптимизатора » Архив блога » Плагины для Wordpress с описанием на русском в 3-х частях. Часть 2.

      [...] список станций, закладки по мелодиям и исполнителям. onAirNow – плагин показывающий самые последние композиции [...]

    60. Trackback from WordPress Plugins - Article | Chaos Region | Incorporated

      [...] onAirNow, apabila anda pengguna iTunes atau WinAmp, maka plugin ini akan memperlihatkan apa yang anda [...]

    61. Ian Archambeau says:

      How to get this working with AMIP – really easy!

      Essentially follow this tutorial: http://amip.tools-for.net/oldhelp/web.htm

      DO NOT DOWNLOAD cURL with SSL!! This gave me a DLL error, just take a normal WIN 32 generic version.

      Then make your in.html (i renamed mine onAirNow.track.temp) look like so:
      %1
      %2
      %4

      then change in.html to onAirNow.track.

      Modify cUrl command accordingly and your off!

      Can be seen in action here: http://www.fieldjournal.co.uk

    62. Ian Archambeau says:

      Oh I should also add! Make all your irc presets contain the commands:
      /template:(c:\amipweb\in.html)c:\amipweb\out.html
      /exec:(c:\amipweb\curl.exe)-B -T out.html -u : ftp:////

      i found that it kept jumping between them, despite random preset wasn’t selected!

    63. Trackback from WP Plugins March 27, 2007 « PolarityII

      [...] onAirNow gets information about your currently playing track from a file uploaded via FTP and displays it on your blog. [...]

    64. Trackback from 300+ Tools for Running Your WordPress Blog : Freshweblab Network

      [...] onAirNow – Now playing plugin that displays most recent song from iTunes or WinAmp. [...]

    65. Tony says:

      Really like this plugin. But I’m having a small problem. I’m getting information other than album info in the output.

      Example: ” « by (Album: / 1985) ”

      What should I edit and where exactly? Your help would be appreciated.

    66. (post author) Daniel Gattermann says:

      Please e-mail me directly with more details if you still have problems.

    67. Raul says:

      Hey man thank u for this awesome plugin! I had some problems but after a few hours I’m OK, is working :P Check it at my brand new website. By the way, I managed to make it work by using both dosomething plugin and AMIP. If anyone needs help setting up onAirNow on his/her blog, just let me know and I’ll try to help. Thing is Daniel that I wonder if there’s a way for the plugin to update the media being played in real time, displaying the time and all that?

    68. alec says:

      Love this plug in I had no trouble at all getting it to work. I wonder, though if there is a way to get it to check the file on a timer and update the widget with ajax, maybe. If you’ve tried this could you let me know?

    69. (post author) Daniel Gattermann says:

      Alec, onAirNow doesn’t support AJAX. The simple reason is I don’t think a visitor is interested in the changing of your currently playing song. Furthermore a visitor most likely won’t view the same page long enough to even encounter the change. This is why I won’t implement a “live refresh” on onAirNow.

    70. Abigail says:

      Just wanted to drop a note and say thank you. We’re implementing this on our site next week. So far we’ve had no problems!

      -Abby

    Leave a Comment!


    313 posts. 18 pages. 423 comments. 53 categories. 67 queries. 0.592 seconds.
    Blog © 2005-2014 Daniel M. Gattermann. Logos, trademarks, etc. © by their respective owners.