Contact

admin

About Me · Send mail to the author(s) E-mail · Twitter

At GROSSWEBER we practice what we preach. We offer trainings for modern software technologies like Behavior Driven Development, Clean Code and Git. Our staff is fluent in a variety of languages, including English.

Feed Icon

Tags

Open Source Projects

Archives

Blogs of friends

Now playing [?]

Error retrieving information from external service.
Audioscrobbler/Last.fm

ClustrMap

Now Playing 2.3 Plugin for Windows Live Writer

Posted in Music | Now Playing at Sunday, March 11, 2007 2:27 AM W. Europe Standard Time

Time to release a major update for my Now Playing Plugin for Windows Live Writer. Over the last weeks some minor bugs surfaced, these have been fixed with the current release.

The %if syntax

One thing that has been bugging me was that metadata placeholders were included into the resulting markup regardless of the actual content. Imagine you have the Amazon plugin enabled and the %AmazonAlbumUrl% placeholder somewhere in your markup template:

<a href="%AmazonAlbumUrl%">%Album%</a>

Later, while you're writing a new blog post you're listening to a mixtape that's not listed on Amazon. Because the Amazon plugin cannot find information about your mixtape, Now Playing will leave the placeholder as-is, resulting in bad markup taking your visitors into HTTP Hell™ filled with lots of peculiar errors messages (I've already seen this happening).

<a href="%AmazonAlbumUrl%">My Mixtape</a>

The new %if statement helps eliminating this shortcoming: Wrap any content that is linked to the availability of a particular placeholder in an %if statement and Now Playing will create perfectly valid markup. The syntax is pretty easy:

%if(%placeholder%<content to insert if the placeholder holds a value>)

The example above, restructured to

%if(%AmazonAlbumUrl%<a href="%AmazonAlbumUrl%">)My Mixtape%if(%AmazonAlbumUrl%</a>)

yields

  • My Mixtape
    
    if the Amazon plugin could not find the album's URL or
  • <a href="http://www.amazon.com/…">My Mixtape</a>
    if the Amazon plugin was able to obtain a link to the album's page on Amazon.

Of course you can nest if statements to create dynamic templates. I work now with the following template:

<p class="nowPlaying">
    Now Playing [<a title="Find out about Now Playing" href="http://therightstuff.de/Projects/NowPlaying/" rel="previewlink">?</a>]:
    %if(%MusicMapArtistUrl%<a href="%MusicMapArtistUrl%" title="Display relations of %Artist% to other artists">)%Artist%%if(%MusicMapArtistUrl%</a>) &ndash;
    %if(%Album%%if(%AmazonAlbumUrl%<a href="%AmazonAlbumUrl%" title="Display Amazon page of the %Album% album">)%Album%%if(%AmazonAlbumUrl%</a>) &ndash; )
    %Title%
</p>

See the %if(%Album%%if(%AmazonAlbumUrl%… nested if statements in line 4? I use this to get rid of the whole album part if I'm listening to a song from my mixed playlist where the music has no album tag.

Now Playing's markup preview currently handles all placeholders as if they're holding values, so you may have to try a little the get your template working as you wish. In case you're having problems with the syntax, please leave a comment and I'll try to explain. 

Other features, fixed bugs and changes

Other little things I've fixed:

  • An important notice about the Windows Media Player Plugin: You need to install the Blogging Plug-In for WMP in order to query the track information. Windows Vista users, please download this plugin which provides the same functionality on Vista (where the Blogging Plug-In refuses to install).
  • The Amazon plugins allows you to set the search index (Amazon US, UK, Germany, France, Canada, Japan) you want use.
  • Amazon has introduced a new access identifier I wasn't aware of. You can now use your Amazon Access Key ID with Now Playing. The possibility to use an Amazon Subscription ID is provided for backward compatibility.
  • The iTunes plugin allows you to set if you want to start the iTunes application if it's not running. (iTunes has always been launched before.)
  • Fixed a minor plugin loading bug and added detailed error messages.
  • Code cleanup.

Download

Now Playing [?]: Wir sind HeldenVon hier an blind – Wütend genug

Saturday, March 24, 2007 9:38:23 PM (W. Europe Standard Time, UTC+01:00)
This plug-in is great... by far one of the best I've found for Windows Live Writer. It works very well with iTunes.
Wednesday, October 10, 2007 4:39:15 PM (W. Europe Daylight Time, UTC+02:00)
Doesn't appear to work with the new version of iTunes.
Daniel
Friday, October 12, 2007 11:24:38 AM (W. Europe Daylight Time, UTC+02:00)
What's the error message you get? I've tested the latest WLW beta (12.0.1183.516), Now Playing 2.4 (from the Windows Live Gallery) and iTunes 7.4.3 and it seems to be working.
Monday, November 26, 2007 4:06:11 PM (W. Europe Standard Time, UTC+01:00)
Is there support for FooBar 2000 v0.9.4.5?

One of your reviews on the Live site states that FooBar works, but I failed to find a way to get Now Playing 2.4 to recognize it, or the metadata streams it uses ( freedb2.org ).

And before someone asks me to "upgrade" to WinAmp or iTunes . . . I would rather do without this plugin before I dump FooBar. It's the only player of which I know that can stream directly to my soundcard without re-sampling my FLAC files.

Thanks in advance!
netdef
Monday, November 26, 2007 5:40:19 PM (W. Europe Standard Time, UTC+01:00)
I didn't take a look at Foobar until now. I usually do that if requests, like yours, come in. I will definitely will evaluate if it's possible to query it Foobar and get NP working with it!
Tuesday, November 27, 2007 7:10:19 PM (W. Europe Standard Time, UTC+01:00)
I just received an e-mail telling that Now Playing 2.5 with support for Foobar2000 is now up on the Live Gallery. (It's also available on NP's update tab.) There's an additional requirement for Foobar2000, please click on the options button to learn more.

Please get back to me if you encounter any problems.
Sunday, March 23, 2008 8:50:58 PM (W. Europe Standard Time, UTC+01:00)
One question. I clicked the setup link ( to download the setup program, obviously) and did the whole installation process. But now I don't have an actual program to use. All it seems to have done is install a folder with all the plug-ins. Am I looking in the wrong area? Exploring my C: Drive (where I installed it) didn't leave me with any results. And I am not sure what to do now.
Gabriela
Sunday, March 23, 2008 9:05:15 PM (W. Europe Standard Time, UTC+01:00)
Nvm, I just figured it out. Dumb question. Haha.
Gabriela
Monday, June 23, 2008 10:37:39 AM (W. Europe Daylight Time, UTC+02:00)
How do you even use this? It's just a folder full of plugin dll's...
Person
Monday, June 23, 2008 10:40:39 AM (W. Europe Daylight Time, UTC+02:00)
Try the installer!
Tuesday, August 19, 2008 2:01:52 PM (W. Europe Daylight Time, UTC+02:00)
Hi, Alexander :)
I have some question about your great plugin Now Playing 2.3 Plugin for Windows Live Writer.
Where plugins store settings? I reinstall my system from scratch, and i whant restore settings for Now Playing, but can't find where settings stored.
Tuesday, August 19, 2008 2:15:46 PM (W. Europe Daylight Time, UTC+02:00)
Hi SaD,
the plugin stores its settings using the infrastructure WLW provides. I'm not sure where WLW stores its own settings, could either be in the registry or in your profile directory. NP currently does not support exporting your settings, so I figure you would either have to back up and restore your registry and profile or re-enter everything (which is bad). I'm thinking about adding an export/import feature.

BTW, there's a new version available (NP 2.5) here.

HTH,

Alex
Tuesday, August 19, 2008 2:49:16 PM (W. Europe Daylight Time, UTC+02:00)
BTW, there's a new version available (NP 2.5) here.

Tnx, i already use latest version ) but this topic is latest on your blog about Now Playing and i write here ).

I figure you would either have to back up and restore your registry and profile or re-enter everything (which is bad). I'm thinking about adding an export/import feature.

Export/import feature was be great ) I will be search where WLW save settings. I whant restore only my template for NP inserting %) Tnx :)
Saturday, December 19, 2009 7:44:05 PM (W. Europe Standard Time, UTC+01:00)
would be nice plugin. thx.
Friday, July 02, 2010 4:22:57 PM (W. Europe Daylight Time, UTC+02:00)
Decent code and a great help - thank you.
Wednesday, September 22, 2010 10:48:58 AM (W. Europe Daylight Time, UTC+02:00)
nice plugin. thx.
All comments require the approval of the site owner before being displayed.
(will show your gravatar icon)
 
[Captcha]Enter the code shown (prevents robots):

Live Comment Preview