I use http://www.slothradio.com/covers/ to find albumcovers once in a while, so I put a quick and dirty menu_item that will launch the url with the correct search string for artist and album.
it might be a nice addition to albumart if rexy's interested... it could probably use some tweaking...
class albumart_menu_items : public menu_item_context
{
private:
enum
{
AA_FIND,
AA_MENU_LAST
};
virtual unsigned get_num_items()
{
return AA_MENU_LAST;
}
virtual void enum_item(unsigned n,string_base & out)
{
switch (n)
{
case AA_FIND:
out = "Albumart/Find Albumart";
break;
}
}
virtual void context_command(unsigned n,const ptr_list_base<metadb_handle> & data,const GUID& caller)
{
if (data.get_count()<1)
return;
switch (n)
{
case AA_FIND:
{
string8 temp;
string8 artist;
string8 album;
data[0]->handle_format_title(temp, "%artist%", NULL);
uReplaceChar(artist, temp, temp.length(), ' ', '+', true);
data[0]->handle_format_title(temp, "%album%", NULL);
uReplaceChar(album, temp, temp.length(), ' ', '+', true);
string8 url = string_printf("http://www.slothradio.com/covers/?adv=&artist=%s&album=%s",artist.get_ptr(), album.get_ptr());
uShellExecute(NULL, "open", url, NULL, NULL,SW_SHOWNORMAL);
}
break;
}
}
};
static service_factory_single_t<menu_item,albumart_menu_items> albumart_menu;