I Have Added a New and Useless Feature to the Site

Regular visitors may have noticed a new feature on the details page for articles, news and other categories of the site. The Details section of the page now has a Listened To item.

This item will display the song (and album) I was listening to while I was writing the article, FAQ, news item or snippet, and it looks like this:
Pretty useless, don't you think? To make it even more useless, the information is also available for currently playing tracks through a web service. You'll find the service here: http://imar.spaanjaars.com/WebServices/PublicContent.asmx. The are a few methods available, like NowPlayingGetDataSet (returns the track info as a DataSet) and NowPlayingGetString (returns the data as a simple string). You can test it out using the Invoke button on the test page for the service.

If you want to find out the gory details of the application, be sure to check out this article. The short version is that I have used some Windows handle stuff in C# to get at the WinAmp window, retrieve the file name and path of the currently playing track, and then use an ID3 reader and static methods from the File class to validate the file and retrieve information from it.
The results of this data retrieval is saved in a text file that can be read by the Web service. This service, in turn, caches the information and uses a CacheDependency that points back to the file with the track info.
The application runs as a Windows service, and polls the WinAmp window once in a while (somewhere between 10 and 100 seconds, depending on its mood).

Although the application's usage is rather limited, it was a nice exercise that used a few interesting technologies like Windows Services, Windows Handles, ID3 tags reading, Web Services and Caching.

If you have more ideas for this feature, let me know.


Where to Next?

Wonder where to go next? You can post a comment on this article. You can read existing comments below or you can post a comment yourself on this article .


Consider making a donation
Please consider making a donation using PayPal. Your donation helps me to pay the bills so I can keep running Imar.Spaanjaars.Com, providing fresh content as often as possible.



Talk Back! Comment on Imar.Spaanjaars.Com

I am interested in what you have to say about this article. Feel free to post any comments, remarks or questions you may have about this article. The Talk Back feature is not meant for technical questions that are not directly related to this article. So, a post like "Hey, can you tell me how I can upload files to a MySQL database in PHP?" is likely to be removed. Also spam and unrealistic job offers will be deleted immediately.

When you post a comment, you have to provide your name and the comment. Your e-mail address is optional and you only need to provide it if you want me to contact you. It will not be displayed along with your comment. I got sick and tired of the comment spam I was receiving, so I have protected this page with a simple calculation exercise. This means that if you want to leave a comment, you'll need to complete the calculation before you hit the Post Comment button.

If you want to object to a comment made by another visitor, be sure to contact me and I'll look into it ASAP. Don't forget to mention the page link, or the QuickDocId of the document.

For more information about the Talk Back feature, check out this news item.