SongWriter Plugin for WMP9 & .NET

Tags: Tech Geek

Once I read over http://dotnetweblogs.com/duncanma/archive/03272003.aspx I decided to go further with the default page the plugin outputs, and actually push it into .NET. 

I first used xsd.exe to create an XSD and then a DataSet based on the XML document.

In VS.NET I create a new C# ASP.NET Web Application, and threw down a DataList, and bound it to the new DataSet (loading in the XML Document of course).

Then I started to play a bit.

Of course it wouldnt be complete if it didnt automatically refresh the page when a new song is being played, so I got the LastWriteTime for the xml file which the plugin writes, and the Duration of the current track playing, and a simple subtraction I got the refresh time for the page.  The handy literal tag in the Head section allowed me to shove out a META REFRESH tag with this new found time-left duration. 

Next I wanted a pretty picture, so i use a simple HTTP Request to query Google's image search engine and grab a link out of the first picture it sends back, hopefull it is there.  Of course im caching this URL so we dont have to keep hitting google for each page load.

For a demo check what Im listening too:  http://duke.santra.com:81/nowplaying/  You dont have to like my music, but you have to admit the plugin is pretty cool.  :) 

Download full source:  http://duke.santra.com:81/nowplaying/nowplaying.rar 

ZIP Download: http://duke.santra.com:81/nowplaying/nowplaying.zip

2 Comments

Comments have been disabled for this content.