Index: configure.ac
===================================================================
--- configure.ac	(revision 5765)
+++ configure.ac	(working copy)
@@ -4,7 +4,7 @@
 AC_INIT(shell)
 AC_CONFIG_MACRO_DIR(macros)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(rhythmbox, 0.11.5)
+AM_INIT_AUTOMAKE(rhythmbox, 0.11.5.20080618)
 
 AC_SUBST(ACLOCAL_AMFLAGS, "-I macros")
 
@@ -1076,6 +1076,8 @@
 plugins/power-manager/Makefile
 plugins/visualizer/Makefile
 plugins/mmkeys/Makefile
+plugins/infobrowser/Makefile
+plugins/infobrowser/infobrowser/Makefile
 bindings/Makefile
 bindings/python/Makefile
 bindings/vala/Makefile
Index: plugins/infobrowser/infobrowser/WikipediaSite.py
===================================================================
--- plugins/infobrowser/infobrowser/WikipediaSite.py	(revision 0)
+++ plugins/infobrowser/infobrowser/WikipediaSite.py	(revision 0)
@@ -0,0 +1,17 @@
+from Site import *
+
+class WikipediaSite(Site):
+        def __init__(self):
+                self.escape = "_"
+                self.baseurl_artist = "http://en.wikipedia.org/wiki/%s"
+                self.baseurl_album = "http://en.wikipedia.org/wiki/%s"
+
+        def get_artist_info(self, action, shell):
+                url = self.baseurl_artist % self.get_artist(shell).replace(' ', self.escape)
+
+		gnomevfs.url_show(url)
+
+        def get_album_info(self, action, shell):
+                url = self.baseurl_album % self.get_album(shell).replace(' ', self.escape)
+
+		gnomevfs.url_show(url)
Index: plugins/infobrowser/infobrowser/LastfmSite.py
===================================================================
--- plugins/infobrowser/infobrowser/LastfmSite.py	(revision 0)
+++ plugins/infobrowser/infobrowser/LastfmSite.py	(revision 0)
@@ -0,0 +1,18 @@
+from Site import *
+
+class LastfmSite(Site):
+        def __init__(self):
+                self.escape = "+"
+                self.baseurl_artist = "http://www.lastfm.com/music/%s"
+                self.baseurl_album = "http://www.lastfm.com/music/%s/%s"
+
+        def get_artist_info(self, action, shell):
+                url = self.baseurl_artist % self.get_artist(shell).replace(' ', self.escape)
+
+		gnomevfs.url_show(url)
+
+        def get_album_info(self, action, shell):
+                url = self.baseurl_album % ( self.get_artist(shell).replace(' ', self.escape), self.get_album(shell).replace(' ', self.escape) )
+
+		gnomevfs.url_show(url)
+
Index: plugins/infobrowser/infobrowser/AllmusicSite.py
===================================================================
--- plugins/infobrowser/infobrowser/AllmusicSite.py	(revision 0)
+++ plugins/infobrowser/infobrowser/AllmusicSite.py	(revision 0)
@@ -0,0 +1,17 @@
+from Site import *
+
+class AllmusicSite(Site):
+        def __init__(self):
+                self.escape = "+"
+                self.baseurl_artist = "http://www.allmusic.com/cg/amg.dll?p=amg&opt1=1&sql=%s"
+                self.baseurl_album = "http://www.allmusic.com/cg/amg.dll?p=amg&opt1=2&sql=%s"
+
+        def get_artist_info(self, action, shell):
+                url = self.baseurl_artist % self.get_artist(shell).replace(' ', self.escape)
+
+		gnomevfs.url_show(url)
+
+        def get_album_info(self, action, shell):
+                url = self.baseurl_album % self.get_album(shell).replace(' ', self.escape)
+
+		gnomevfs.url_show(url)
Index: plugins/infobrowser/infobrowser/infobrowser.py
===================================================================
--- plugins/infobrowser/infobrowser/infobrowser.py	(revision 0)
+++ plugins/infobrowser/infobrowser/infobrowser.py	(revision 0)
@@ -0,0 +1,78 @@
+#
+# Copyright 2006 Alex Lancaster
+# Copyright 2007 John Daiker
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation
+
+import os, string
+import gtk, gobject
+import urllib
+from xml.dom import minidom
+import threading
+from gettext import gettext as _
+import rb
+
+from AllmusicSite import *
+from DiscogsSite import *
+from GoogleSite import *
+from LastfmSite import *
+from WikipediaSite import *
+
+site_menu_headers = \
+	[('ViewArtistInfo', 'NULL-and-null-do-not-work', _("Artist _Info")),
+	 ('ViewAlbumInfo', 'asdf', _("Album I_nfo"))]
+
+class InfoBrowserPlugin(rb.Plugin):
+
+    def __init__ (self):
+	rb.Plugin.__init__ (self)
+
+    def activate (self, shell):
+	self.action_group = gtk.ActionGroup ('InfoBrowserPluginActions')
+
+	uim = shell.get_ui_manager ()
+
+	ui_file = self.find_file("infobrowser-ui.xml")
+	uim.add_ui_from_file(ui_file)
+
+	allmusicSite = AllmusicSite()
+	discogsSite = DiscogsSite()
+	googleSite = GoogleSite()
+	lastfmSite = LastfmSite()
+	wikipediaSite = WikipediaSite()
+
+	site_menu_artist_entries = \
+		(
+		('ViewArtistInfoAllmusic', 'asdf', _("_AllMusic"), None, None, allmusicSite.get_artist_info),
+		('ViewArtistInfoDiscogs', 'asdf', _("_Discogs"), None, None, discogsSite.get_artist_info),
+		('ViewArtistInfoGoogle', 'asdf', _("_Google"), None, None, googleSite.get_artist_info),
+		('ViewArtistInfoLastfm', 'asdf', _("_Last.fm"), None, None, lastfmSite.get_artist_info),
+		('ViewArtistInfoWikipedia', 'asdf', _("_Wikipedia"), None, None, wikipediaSite.get_artist_info)
+		)
+
+	site_menu_album_entries = \
+		(
+		('ViewAlbumInfoAllmusic', 'rb-album-info', _("_AllMusic"), None, None, allmusicSite.get_album_info),
+		('ViewAlbumInfoDiscogs', 'rb-album-info', _("_Discogs"), None, None, discogsSite.get_album_info),
+		('ViewAlbumInfoGoogle', 'rb-album-info', _("_Google"), None, None, googleSite.get_album_info),
+		('ViewAlbumInfoLastfm', 'rb-album-info', _("_Last.fm"), None, None, lastfmSite.get_album_info),
+		('ViewAlbumInfoWikipedia', 'rb-album-info', _("_Wikipedia"), None, None, wikipediaSite.get_album_info)
+		)
+
+	self.action_group.add_actions (site_menu_headers)
+
+	self.action_group.add_actions (site_menu_artist_entries, user_data=shell)
+
+	self.action_group.add_actions (site_menu_album_entries, user_data=shell)
+
+	uim.insert_action_group (self.action_group, 0)
+	uim.ensure_update ()
+
+    def deactivate (self, shell):
+	uim = shell.get_ui_manager()
+	uim.remove_action_group (self.action_group)
+
+	del self.action_group
+
Index: plugins/infobrowser/infobrowser/DiscogsSite.py
===================================================================
--- plugins/infobrowser/infobrowser/DiscogsSite.py	(revision 0)
+++ plugins/infobrowser/infobrowser/DiscogsSite.py	(revision 0)
@@ -0,0 +1,18 @@
+from Site import *
+
+class DiscogsSite(Site):
+        def __init__(self):
+                self.escape = "+"
+                self.baseurl_artist = "http://www.discogs.com/search?type=artists&q=%s"
+                self.baseurl_album = "http://www.discogs.com/search?type=releases&q=%s+-+%s"
+
+        def get_artist_info(self, action, shell):
+                url = self.baseurl_artist % self.get_artist(shell).replace(' ', self.escape)
+
+		gnomevfs.url_show(url)
+
+        def get_album_info(self, action, shell):
+                url = self.baseurl_album % ( self.get_artist(shell).replace(' ', self.escape), self.get_album(shell).replace(' ', self.escape) )
+
+		gnomevfs.url_show(url)
+
Index: plugins/infobrowser/infobrowser/GoogleSite.py
===================================================================
--- plugins/infobrowser/infobrowser/GoogleSite.py	(revision 0)
+++ plugins/infobrowser/infobrowser/GoogleSite.py	(revision 0)
@@ -0,0 +1,17 @@
+from Site import *
+
+class GoogleSite(Site):
+        def __init__(self):
+                self.escape = "+"
+                self.baseurl_artist = "http://www.google.com/musicsearch?q=%s&res=artist"
+                self.baseurl_album = "http://www.google.com/musicsearch?q=%s&res=album"
+
+        def get_artist_info(self, action, shell):
+                url = self.baseurl_artist % self.get_artist(shell).replace(' ', self.escape)
+
+		gnomevfs.url_show(url)
+
+        def get_album_info(self, action, shell):
+                url = self.baseurl_album % self.get_album(shell).replace(' ', self.escape)
+
+		gnomevfs.url_show(url)
Index: plugins/infobrowser/infobrowser/Makefile.am
===================================================================
--- plugins/infobrowser/infobrowser/Makefile.am	(revision 0)
+++ plugins/infobrowser/infobrowser/Makefile.am	(revision 0)
@@ -0,0 +1,11 @@
+# Infobrowser Python Plugin
+
+plugindir = $(PLUGINDIR)/infobrowser
+plugin_PYTHON=			\
+	AllmusicSite.py		\
+	DiscogsSite.py		\
+	GoogleSite.py		\
+	infobrowser.py		\
+	LastfmSite.py		\
+	Site.py			\
+	WikipediaSite.py
Index: plugins/infobrowser/infobrowser/Site.py
===================================================================
--- plugins/infobrowser/infobrowser/Site.py	(revision 0)
+++ plugins/infobrowser/infobrowser/Site.py	(revision 0)
@@ -0,0 +1,42 @@
+import os
+import rhythmdb
+import urllib
+import gnomevfs
+
+class Site:
+        def __init__(self):
+                asdf=""
+
+        def get_artist_info(self, action, shell):
+                return "get_artist_info"
+
+        def get_album_info(self, action, shell):
+                return "get_album_info"
+
+        def get_artist(self, shell):
+                db = shell.get_property ("db")
+                sp = shell.get_player ()
+                selected_source = shell.get_property("selected-source")
+                ev = selected_source.get_entry_view()
+
+                # take first entry in list
+                entry = ev.get_selected_entries()[0]
+
+                artist = db.entry_get(entry, rhythmdb.PROP_ARTIST)
+                artist = urllib.quote(artist)
+
+                return artist
+
+        def get_album(self, shell):
+                db = shell.get_property ("db")
+                sp = shell.get_player ()
+                selected_source = shell.get_property("selected-source")
+                ev = selected_source.get_entry_view()
+
+                # take first entry in list
+                entry = ev.get_selected_entries()[0]
+
+                album = db.entry_get(entry, rhythmdb.PROP_ALBUM)
+                album = urllib.quote(album)
+
+                return album
Index: plugins/infobrowser/infobrowser.rb-plugin.in
===================================================================
--- plugins/infobrowser/infobrowser.rb-plugin.in	(revision 0)
+++ plugins/infobrowser/infobrowser.rb-plugin.in	(revision 0)
@@ -0,0 +1,9 @@
+[RB Plugin]
+Loader=python
+Module=infobrowser
+IAge=1
+_Name=Artist/Album Info Browser
+_Description=Launches web browser showing info for selected artist/album
+Authors=Alex Lancaster & John Daiker
+Copyright=Copyright © 2006-2008 Alex Lancaster, John Daiker
+Website=http://www.rhythmbox.org/
Index: plugins/infobrowser/Makefile.am
===================================================================
--- plugins/infobrowser/Makefile.am	(revision 0)
+++ plugins/infobrowser/Makefile.am	(revision 0)
@@ -0,0 +1,18 @@
+# Infobrowser Python Plugin
+
+SUBDIRS = infobrowser
+plugindir = $(PLUGINDIR)/infobrowser
+
+%.rb-plugin: %.rb-plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+plugin_DATA = $(plugin_in_files:.rb-plugin.in=.rb-plugin)
+
+plugin_in_files = infobrowser.rb-plugin.in
+
+uixmldir = $(plugindir)
+uixml_DATA =	\
+		infobrowser-ui.xml
+
+EXTRA_DIST = $(plugin_in_files) $(uixml_DATA)
+CLEANFILES = $(plugin_DATA)
+DISTCLEANFILES = $(plugin_DATA)
Index: plugins/infobrowser/infobrowser-ui.xml
===================================================================
--- plugins/infobrowser/infobrowser-ui.xml	(revision 0)
+++ plugins/infobrowser/infobrowser-ui.xml	(revision 0)
@@ -0,0 +1,84 @@
+<ui>
+  <popup name="BrowserSourceViewPopup">
+    <separator/>
+      <menu name="ViewArtistInfo" action="ViewArtistInfo">
+        <menuitem name="ViewArtistInfoAllmusic" action="ViewArtistInfoAllmusic"/>
+        <menuitem name="ViewArtistInfoDiscogs" action="ViewArtistInfoDiscogs"/>
+        <menuitem name="ViewArtistInfoGoogle" action="ViewArtistInfoGoogle"/>
+        <menuitem name="ViewArtistInfoLastfm" action="ViewArtistInfoLastfm"/>
+        <menuitem name="ViewArtistInfoWikipedia" action="ViewArtistInfoWikipedia"/>
+      </menu>
+      <menu name="ViewAlbumInfo" action="ViewAlbumInfo">
+        <menuitem name="ViewAlbumInfoAllmusic" action="ViewAlbumInfoAllmusic"/>
+        <menuitem name="ViewAlbumInfoDiscogs" action="ViewAlbumInfoDiscogs"/>
+        <menuitem name="ViewAlbumInfoGoogle" action="ViewAlbumInfoGoogle"/>
+        <menuitem name="ViewAlbumInfoLastfm" action="ViewAlbumInfoLastfm"/>
+        <menuitem name="ViewAlbumInfoWikipedia" action="ViewAlbumInfoWikipedia"/>
+      </menu>
+  </popup>
+  <popup name="PlaylistViewPopup">
+      <menu name="ViewArtistInfo" action="ViewArtistInfo">
+        <menuitem name="ViewArtistInfoAllmusic" action="ViewArtistInfoAllmusic"/>
+        <menuitem name="ViewArtistInfoDiscogs" action="ViewArtistInfoDiscogs"/>
+        <menuitem name="ViewArtistInfoGoogle" action="ViewArtistInfoGoogle"/>
+        <menuitem name="ViewArtistInfoLastfm" action="ViewArtistInfoLastfm"/>
+        <menuitem name="ViewArtistInfoWikipedia" action="ViewArtistInfoWikipedia"/>
+      </menu>
+      <menu name="ViewAlbumInfo" action="ViewAlbumInfo">
+        <menuitem name="ViewAlbumInfoAllmusic" action="ViewAlbumInfoAllmusic"/>
+        <menuitem name="ViewAlbumInfoDiscogs" action="ViewAlbumInfoDiscogs"/>
+        <menuitem name="ViewAlbumInfoGoogle" action="ViewAlbumInfoGoogle"/>
+        <menuitem name="ViewAlbumInfoLastfm" action="ViewAlbumInfoLastfm"/>
+        <menuitem name="ViewAlbumInfoWikipedia" action="ViewAlbumInfoWikipedia"/>
+      </menu>
+  </popup>
+  <popup name="AutoPlaylistSourcePopup">
+      <menu name="ViewArtistInfo" action="ViewArtistInfo">
+        <menuitem name="ViewArtistInfoAllmusic" action="ViewArtistInfoAllmusic"/>
+        <menuitem name="ViewArtistInfoDiscogs" action="ViewArtistInfoDiscogs"/>
+        <menuitem name="ViewArtistInfoGoogle" action="ViewArtistInfoGoogle"/>
+        <menuitem name="ViewArtistInfoLastfm" action="ViewArtistInfoLastfm"/>
+        <menuitem name="ViewArtistInfoWikipedia" action="ViewArtistInfoWikipedia"/>
+      </menu>
+      <menu name="ViewAlbumInfo" action="ViewAlbumInfo">
+        <menuitem name="ViewAlbumInfoAllmusic" action="ViewAlbumInfoAllmusic"/>
+        <menuitem name="ViewAlbumInfoDiscogs" action="ViewAlbumInfoDiscogs"/>
+        <menuitem name="ViewAlbumInfoGoogle" action="ViewAlbumInfoGoogle"/>
+        <menuitem name="ViewAlbumInfoLastfm" action="ViewAlbumInfoLastfm"/>
+        <menuitem name="ViewAlbumInfoWikipedia" action="ViewAlbumInfoWikipedia"/>
+      </menu>
+  </popup>
+  <popup name="QueueSidebarViewPopup">
+      <menu name="ViewArtistInfo" action="ViewArtistInfo">
+        <menuitem name="ViewArtistInfoAllmusic" action="ViewArtistInfoAllmusic"/>
+        <menuitem name="ViewArtistInfoDiscogs" action="ViewArtistInfoDiscogs"/>
+        <menuitem name="ViewArtistInfoGoogle" action="ViewArtistInfoGoogle"/>
+        <menuitem name="ViewArtistInfoLastfm" action="ViewArtistInfoLastfm"/>
+        <menuitem name="ViewArtistInfoWikipedia" action="ViewArtistInfoWikipedia"/>
+      </menu>
+      <menu name="ViewAlbumInfo" action="ViewAlbumInfo">
+        <menuitem name="ViewAlbumInfoAllmusic" action="ViewAlbumInfoAllmusic"/>
+        <menuitem name="ViewAlbumInfoDiscogs" action="ViewAlbumInfoDiscogs"/>
+        <menuitem name="ViewAlbumInfoGoogle" action="ViewAlbumInfoGoogle"/>
+        <menuitem name="ViewAlbumInfoLastfm" action="ViewAlbumInfoLastfm"/>
+        <menuitem name="ViewAlbumInfoWikipedia" action="ViewAlbumInfoWikipedia"/>
+      </menu>
+  </popup>
+  <popup name="QueuePlaylistViewPopup">
+      <menu name="ViewArtistInfo" action="ViewArtistInfo">
+        <menuitem name="ViewArtistInfoAllmusic" action="ViewArtistInfoAllmusic"/>
+        <menuitem name="ViewArtistInfoDiscogs" action="ViewArtistInfoDiscogs"/>
+        <menuitem name="ViewArtistInfoGoogle" action="ViewArtistInfoGoogle"/>
+        <menuitem name="ViewArtistInfoLastfm" action="ViewArtistInfoLastfm"/>
+        <menuitem name="ViewArtistInfoWikipedia" action="ViewArtistInfoWikipedia"/>
+      </menu>
+      <menu name="ViewAlbumInfo" action="ViewAlbumInfo">
+        <menuitem name="ViewAlbumInfoAllmusic" action="ViewAlbumInfoAllmusic"/>
+        <menuitem name="ViewAlbumInfoDiscogs" action="ViewAlbumInfoDiscogs"/>
+        <menuitem name="ViewAlbumInfoGoogle" action="ViewAlbumInfoGoogle"/>
+        <menuitem name="ViewAlbumInfoLastfm" action="ViewAlbumInfoLastfm"/>
+        <menuitem name="ViewAlbumInfoWikipedia" action="ViewAlbumInfoWikipedia"/>
+      </menu>
+  </popup>
+</ui>
+
Index: plugins/Makefile.am
===================================================================
--- plugins/Makefile.am	(revision 5765)
+++ plugins/Makefile.am	(working copy)
@@ -25,6 +25,7 @@
 	magnatune					\
 	jamendo						\
 	coherence					\
+	infobrowser					\
 	rb
 endif
 
