? cc-sharp
? data/images/cc-all.xcf
? data/images/cc-attribution.png
? data/images/cc-no-derivs.png
? data/images/cc-noncommercial.png
? data/images/cc-public-domain.png
? data/images/cc-sampling-plus.png
? data/images/cc-sampling.png
? data/images/cc-share-alike.png
? data/images/cc-standard.png
? src/LicenseRenderer.cs
? src/Banshee.Base/CreativeCommons.cs
Index: data/banshee.glade
===================================================================
RCS file: /cvs/gnome/banshee/data/banshee.glade,v
retrieving revision 1.21
diff -u -p -r1.21 banshee.glade
--- data/banshee.glade	21 Jun 2006 17:51:33 -0000	1.21
+++ data/banshee.glade	26 Jul 2006 20:27:50 -0000
@@ -1497,7 +1497,7 @@
 	      <child>
 		<widget class="GtkTable" id="table2">
 		  <property name="visible">True</property>
-		  <property name="n_rows">4</property>
+		  <property name="n_rows">5</property>
 		  <property name="n_columns">4</property>
 		  <property name="homogeneous">False</property>
 		  <property name="row_spacing">5</property>
@@ -1895,6 +1895,62 @@
 		      <property name="top_attach">3</property>
 		      <property name="bottom_attach">4</property>
 		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label80">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">License:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="License">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Unknown</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">True</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_MIDDLE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
 		      <property name="y_options"></property>
 		    </packing>
 		  </child>
Index: data/images/Makefile.am
===================================================================
RCS file: /cvs/gnome/banshee/data/images/Makefile.am,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile.am
--- data/images/Makefile.am	21 Jun 2006 01:43:56 -0000	1.37
+++ data/images/Makefile.am	26 Jul 2006 20:27:50 -0000
@@ -67,6 +67,14 @@ EXTRA_DIST = \
 	cd-action-burn-32.png \
 	cd-action-burn-48.png \
 	encode-action-24.png \
+	cc-attribution.png \
+	cc-no-derivs.png \
+	cc-noncommercial.png \
+	cc-public-domain.png \
+	cc-sampling-plus.png \
+	cc-sampling.png \
+	cc-share-alike.png \
+	cc-standard.png \
 	splash.png
 
 generate-resource-list:
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/banshee/src/Makefile.am,v
retrieving revision 1.98
diff -u -p -r1.98 Makefile.am
--- src/Makefile.am	21 Jun 2006 17:51:33 -0000	1.98
+++ src/Makefile.am	26 Jul 2006 20:27:50 -0000
@@ -48,6 +48,7 @@ banshee_sources = \
 	IPlaybackModel.cs \
 	RemotePlayer.cs \
 	RatingRenderer.cs \
+	LicenseRenderer.cs \
 	ExceptionDialog.cs \
 	VersionInformationDialog.cs \
 	LogCoreViewer.cs \
@@ -103,6 +104,14 @@ banshee_resources = \
 	data/images/cd-action-burn-24.png \
 	data/images/cd-action-burn-32.png \
 	data/images/cd-action-burn-48.png \
+	data/images/cc-attribution.png \
+	data/images/cc-no-derivs.png \
+	data/images/cc-noncommercial.png \
+	data/images/cc-public-domain.png \
+	data/images/cc-sampling-plus.png \
+	data/images/cc-sampling.png \
+	data/images/cc-share-alike.png \
+	data/images/cc-standard.png \
 	data/images/encode-action-24.png
 
 banshee_resources_build = $(foreach res,$(banshee_resources), $(addprefix -resource:,$(srcdir)/../$(res)),$(notdir $(res)))
Index: src/PlaylistView.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/PlaylistView.cs,v
retrieving revision 1.53
diff -u -p -r1.53 PlaylistView.cs
--- src/PlaylistView.cs	12 Jul 2006 21:12:16 -0000	1.53
+++ src/PlaylistView.cs	26 Jul 2006 20:27:51 -0000
@@ -62,7 +62,8 @@ namespace Banshee
             Time,
             Rating,
             PlayCount,
-            LastPlayed
+            LastPlayed,
+            License
         };
             
         private ArrayList columns;
@@ -77,6 +78,7 @@ namespace Banshee
         public PlaylistColumn RatingColumn;
         public PlaylistColumn PlaysColumn;
         public PlaylistColumn LastPlayedColumn;
+        public PlaylistColumn LicenseColumn;
         
         private class ColumnSorter : IComparer
         {
@@ -115,7 +117,8 @@ namespace Banshee
             
             RatingColumn = new PlaylistColumn(this, 
                 Catalog.GetString("Rating"), "Rating",
-                new TreeCellDataFunc(TrackCellRating), new RatingRenderer(),
+                new TreeCellDataFunc(TrackCellRating),
+                new RatingRenderer(),
                 7, (int)ColumnId.Rating);
             columns.Add(RatingColumn);
             
@@ -132,6 +135,13 @@ namespace Banshee
                 new CellRendererText(),
                 9, (int)ColumnId.LastPlayed);
             columns.Add(LastPlayedColumn);
+        	
+        	LicenseColumn = new PlaylistColumn(this, 
+                Catalog.GetString("License"), "License",
+                new TreeCellDataFunc(TrackCellLicense),
+                new LicenseRenderer(),
+                10, (int)ColumnId.License);
+            columns.Add(LicenseColumn);
             
             columns.Sort(new ColumnSorter());
             
@@ -190,7 +200,7 @@ namespace Banshee
             Selection.Mode = SelectionMode.Multiple;
             
             model.SetSortFunc((int)ColumnId.Track, 
-                    new TreeIterCompareFunc(TrackTreeIterCompareFunc));
+                new TreeIterCompareFunc(TrackTreeIterCompareFunc));
             model.SetSortFunc((int)ColumnId.Artist, 
                 new TreeIterCompareFunc(ArtistTreeIterCompareFunc));
             model.SetSortFunc((int)ColumnId.Title, 
@@ -209,6 +219,8 @@ namespace Banshee
                 new TreeIterCompareFunc(PlayCountTreeIterCompareFunc));
             model.SetSortFunc((int)ColumnId.LastPlayed, 
                 new TreeIterCompareFunc(LastPlayedTreeIterCompareFunc));
+            model.SetSortFunc((int)ColumnId.License, 
+                new TreeIterCompareFunc(LicenseTreeIterCompareFunc));
         }    
 
         private void OnRipToggled(object o, ToggledArgs args)
@@ -290,6 +302,13 @@ namespace Banshee
             return StringFieldCompare(model.IterTrackInfo(a).Genre, 
                 model.IterTrackInfo(b).Genre);
         }
+                
+        public int LicenseTreeIterCompareFunc(TreeModel _model, TreeIter a, 
+            TreeIter b)
+        {
+            return StringFieldCompare(model.IterTrackInfo(a).License, 
+                model.IterTrackInfo(b).License);
+        }  
         
         public int YearTreeIterCompareFunc(TreeModel _model, TreeIter a,
             TreeIter b)
@@ -430,7 +449,7 @@ namespace Banshee
                 toggle.Active = false;
             }
         }
-        
+
         protected void TrackCellTrack(TreeViewColumn tree_column,
             CellRenderer cell, TreeModel tree_model, TreeIter iter)
         {
@@ -482,10 +501,21 @@ namespace Banshee
             if(ti == null) {
                 return;
             }
-            
+
             SetRendererAttributes((CellRendererText)cell, ti.Genre, iter);
         }
-        
+
+        protected void TrackCellLicense(TreeViewColumn tree_column,
+            CellRenderer cell, TreeModel tree_model, TreeIter iter)
+        {
+            TrackInfo ti = model.IterTrackInfo(iter);
+            if(ti == null) {
+                return;
+            }
+            
+            ((LicenseRenderer)cell).Track = ti;
+        }
+
         protected void TrackCellYear(TreeViewColumn tree_column,
             CellRenderer cell, TreeModel tree_model, TreeIter iter)
         {
@@ -549,10 +579,10 @@ namespace Banshee
             if(lastPlayed > DateTime.MinValue) {
                 disp = lastPlayed.ToString();
             }
-            
+
             SetRendererAttributes((CellRendererText)cell, String.Format("{0}", disp), iter);
         }
-        
+
         public void PlayPath(TreePath path)
         {
             model.PlayPath(path);
Index: src/TrackProperties.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/TrackProperties.cs,v
retrieving revision 1.28
diff -u -p -r1.28 TrackProperties.cs
--- src/TrackProperties.cs	21 Jun 2006 01:43:57 -0000	1.28
+++ src/TrackProperties.cs	26 Jul 2006 20:27:51 -0000
@@ -116,6 +116,7 @@ namespace Banshee
         [Widget] private Label Channels;
         [Widget] private Label MimeType;
         [Widget] private Label ExtraInfo;
+        [Widget] private Label License;
         
         Tooltips tips = new Tooltips();
         
@@ -256,6 +257,13 @@ namespace Banshee
                     Channels.Text = af.Channels.ToString();
                     MimeType.Text = af.MimeType;
                     ExtraInfo.Text = af.EncodingType;
+
+                    if(track.Track.License != null)
+                        License.Text = String.Format("{0}", track.Track.LicenseUri);
+                    else if(track.Track.LicenseUri != null)
+                        License.Text = String.Format("Invalid claim: {0}", track.Track.LicenseUri);
+                    else
+                        License.Text = "None";
                 } catch(Exception e) {
                     BitRate.Text = Catalog.GetString("Unknown");
                     SampleRate.Text = Catalog.GetString("Unknown");
@@ -263,6 +271,7 @@ namespace Banshee
                     Channels.Text = Catalog.GetString("Unknown");
                     MimeType.Text = Catalog.GetString("Unknown");
                     ExtraInfo.Text = Catalog.GetString("Unknown");
+                    License.Text = Catalog.GetString("Unknown");                    
                 }
             }
             
Index: src/Banshee.Base/Database.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/Banshee.Base/Database.cs,v
retrieving revision 1.7
diff -u -p -r1.7 Database.cs
--- src/Banshee.Base/Database.cs	22 May 2006 17:01:49 -0000	1.7
+++ src/Banshee.Base/Database.cs	26 Jul 2006 20:27:52 -0000
@@ -58,6 +58,12 @@ namespace Banshee.Base
                    	Label TEXT,
                    	Title TEXT,
                    	Genre TEXT,
+                   	
+                   	License TEXT,
+                   	Copyright TEXT,
+                   	LicenseURI TEXT,
+                   	MetadataURI TEXT,
+                   	
                    	Year INTEGER,
                    	
                    	TrackNumber INTEGER,
@@ -127,6 +133,34 @@ namespace Banshee.Base
             } catch(ApplicationException) {
                 LogCore.Instance.PushDebug("Adding new database column", "ViewOrder INTEGER");
                 Execute("ALTER TABLE PlaylistEntries ADD ViewOrder INTEGER NOT NULL DEFAULT 0");
+            }
+            
+            try {
+                QuerySingle("SELECT License FROM Tracks LIMIT 1");
+            } catch(ApplicationException) {
+                LogCore.Instance.PushDebug("Adding new database column", "License TEXT");
+                Execute("ALTER TABLE Tracks ADD License TEXT");
+            }
+  
+            try {
+                QuerySingle("SELECT Copyright FROM Tracks LIMIT 1");
+            } catch(ApplicationException) {
+                LogCore.Instance.PushDebug("Adding new database column", "Copyright TEXT");
+                Execute("ALTER TABLE Tracks ADD Copyright TEXT");
+            }
+  
+            try {
+                QuerySingle("SELECT LicenseURI FROM Tracks LIMIT 1");
+            } catch(ApplicationException) {
+                LogCore.Instance.PushDebug("Adding new database column", "LicenseURI TEXT");
+                Execute("ALTER TABLE Tracks ADD LicenseURI TEXT");
+            }
+
+            try {
+                QuerySingle("SELECT MetadataURI FROM Tracks LIMIT 1");
+            } catch(ApplicationException) {
+                LogCore.Instance.PushDebug("Adding new database column", "MetadataURI TEXT");
+                Execute("ALTER TABLE Tracks ADD MetadataURI TEXT");
             }
         }
     }
Index: src/Banshee.Base/LibraryTrackInfo.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/Banshee.Base/LibraryTrackInfo.cs,v
retrieving revision 1.12
diff -u -p -r1.12 LibraryTrackInfo.cs
--- src/Banshee.Base/LibraryTrackInfo.cs	14 May 2006 03:22:46 -0000	1.12
+++ src/Banshee.Base/LibraryTrackInfo.cs	26 Jul 2006 20:27:52 -0000
@@ -302,6 +302,10 @@ namespace Banshee.Base
                     "Label", label,
                     "Title", title, 
                     "Genre", genre, 
+                    "License", license,
+                    "Copyright", copyright,
+                    "LicenseURI", license_uri,
+                    "MetadataURI", metadata_uri,
                     "Year", year,
                     "DateAddedStamp", DateTimeUtil.FromDateTime(date_added), 
                     "TrackNumber", track_number, 
@@ -326,6 +330,10 @@ namespace Banshee.Base
                     "Label", label,
                     "Title", title, 
                     "Genre", genre, 
+                    "License", license,
+                    "Copyright", copyright,
+                    "LicenseURI", license_uri,
+                    "MetadataURI", metadata_uri,
                     "Year", year,
                     "DateAddedStamp", DateTimeUtil.FromDateTime(date_added), 
                     "TrackNumber", track_number, 
@@ -393,6 +401,12 @@ namespace Banshee.Base
             performer = reader["Performer"] as string;
             title = reader["Title"] as string;
             genre = reader["Genre"] as string;
+            
+            license = reader["License"] as string;
+            copyright = reader["Copyright"] as string;
+            license_uri = reader["LicenseURI"] as string;
+            metadata_uri = reader["MetadataURI"] as string;
+            
             asin = reader["ASIN"] as string;
             
             if(genre == "Unknown") {
Index: src/Banshee.Base/Makefile.am
===================================================================
RCS file: /cvs/gnome/banshee/src/Banshee.Base/Makefile.am,v
retrieving revision 1.41
diff -u -p -r1.41 Makefile.am
--- src/Banshee.Base/Makefile.am	18 Jul 2006 13:53:36 -0000	1.41
+++ src/Banshee.Base/Makefile.am	26 Jul 2006 20:27:52 -0000
@@ -160,11 +160,12 @@ ASSEMBLY_SOURCES = \
 	$(srcdir)/Catalog.cs \
 	$(srcdir)/Branding.cs \
 	$(srcdir)/BansheeBranding.cs \
+	$(srcdir)/CreativeCommons.cs \
 	$(srcdir)/ComponentInitializer.cs \
 	$(srcdir)/PowerManagement.cs 
 
 $(ASSEMBLY): $(ASSEMBLY_SOURCES) $(srcdir)/../../data/UIManagerLayout.xml
-	$(MCS) $(MCS_FLAGS) -target:library -r:System.Data -r:Mono.Data.SqliteClient -r:$(top_builddir)/entagged-sharp/entagged-sharp.dll -r:$(top_builddir)/src/Banshee.Widgets/Banshee.Widgets.dll -r:$(top_builddir)/burn-sharp/burn-sharp.dll -r:$(top_builddir)/src/MusicBrainz/MusicBrainz.dll -r:$(top_builddir)/hal-sharp/hal-sharp.dll $(GTKSHARP_LIBS) $(DBUSSHARP_LIBS) -r:Mono.Posix $(DAAPSHARP_LIBS) -resource:$(srcdir)/../../data/UIManagerLayout.xml,UIManagerLayout.xml -resource:$(srcdir)/../../data/images/splash.png,splash.png -out:$@ $(ASSEMBLY_SOURCES) $(bansheebase_generated_sources)
+	$(MCS) $(MCS_FLAGS) -target:library -r:System.Data -r:Mono.Data.SqliteClient -r:$(top_builddir)/entagged-sharp/entagged-sharp.dll -r:$(top_builddir)/cc-sharp/cc-sharp.dll -r:$(top_builddir)/src/Banshee.Widgets/Banshee.Widgets.dll -r:$(top_builddir)/burn-sharp/burn-sharp.dll -r:$(top_builddir)/src/MusicBrainz/MusicBrainz.dll -r:$(top_builddir)/hal-sharp/hal-sharp.dll $(GTKSHARP_LIBS) $(DBUSSHARP_LIBS) -r:Mono.Posix $(DAAPSHARP_LIBS) -resource:$(srcdir)/../../data/UIManagerLayout.xml,UIManagerLayout.xml -resource:$(srcdir)/../../data/images/splash.png,splash.png -out:$@ $(ASSEMBLY_SOURCES) $(bansheebase_generated_sources)
 
 EXTRA_DIST = $(ASSEMBLY_SOURCES) $(bansheebase_sources_in) $(ASSEMBLY).config.in 
 CLEANFILES = $(ASSEMBLY) *.dll *.exe
Index: src/Banshee.Base/StreamTagger.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/Banshee.Base/StreamTagger.cs,v
retrieving revision 1.2
diff -u -p -r1.2 StreamTagger.cs
--- src/Banshee.Base/StreamTagger.cs	14 May 2006 03:22:46 -0000	1.2
+++ src/Banshee.Base/StreamTagger.cs	26 Jul 2006 20:27:52 -0000
@@ -66,6 +66,10 @@ namespace Banshee.Base
                     case CommonTags.Genre:
                         track.Genre = Choose((string)tag.Value, track.Genre);
                         break;
+                    case CommonTags.Copyright:
+                        track.Copyright = Choose((string)tag.Value, track.Copyright);
+                        CreativeCommons.VerifyLicense(track);
+                        break;
                     case CommonTags.TrackNumber:
                         uint track_number = (uint)tag.Value;
                         track.TrackNumber = track_number == 0 ? track.TrackNumber : track_number;
Index: src/Banshee.Base/TrackInfo.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/Banshee.Base/TrackInfo.cs,v
retrieving revision 1.14
diff -u -p -r1.14 TrackInfo.cs
--- src/Banshee.Base/TrackInfo.cs	6 Jul 2006 19:32:34 -0000	1.14
+++ src/Banshee.Base/TrackInfo.cs	26 Jul 2006 20:27:52 -0000
@@ -58,6 +58,11 @@ namespace Banshee.Base
         protected string genre;
         protected string performer;
 
+        protected string license;       // License name; Empty if unverified
+        protected string copyright;     // License and Verification URIs (TCOP)
+        protected string license_uri;   // License URI (WCOP)
+        protected string metadata_uri;  // Metadata verification URI (WOAF)
+
         protected string asin;
         protected string label;
 
@@ -255,6 +260,50 @@ namespace Banshee.Base
                 genre = value; 
                 WriteUpdate(); 
             } 
+        }
+
+        public string License {
+            get {
+                return license;
+            }
+
+            set {
+                license = value;
+                WriteUpdate();
+            }
+        }
+
+        public string Copyright { 
+            get { 
+                return copyright;
+            }
+
+            set { 
+                copyright = value; 
+                WriteUpdate();
+            } 
+        }
+
+        public string LicenseUri { 
+            get { 
+                return license_uri;
+            }
+
+            set { 
+                license_uri = value; 
+                WriteUpdate();
+            } 
+        }
+
+        public string MetadataUri {
+            get {
+                return metadata_uri;
+            }
+
+            set {
+                metadata_uri = value;
+                WriteUpdate();
+            }
         }
 
         [BansheeTodo("Completely unused, should we even have this?")]
--- /dev/null	2006-05-30 21:15:07.000000000 -0400
+++ src/LicenseRenderer.cs	2006-07-26 15:55:17.000000000 -0400
@@ -0,0 +1,104 @@
+/***************************************************************************
+ *  LicenseRenderer.cs
+ *
+ *  Copyright (C) 2006 Luke Hoersten
+ *  Written by Luke Hoersten <luke.hoersten@gmail.com>
+ ****************************************************************************/
+ 
+using System;
+using System.Collections.Generic;
+using Gtk;
+using Gdk;
+
+using Banshee.Base;
+
+namespace Banshee
+{
+	public class LicenseRenderer : CellRenderer
+	{
+	    private const int MAX_ATTRIBUTES = 3;
+	    private static string[] split_result = new string[MAX_ATTRIBUTES];
+	    private static char[] splitter  = {'-'};	    
+	    
+	    private static Dictionary<string, Gdk.Pixbuf> icons;	    
+	    
+		public TrackInfo Track;
+		
+		public LicenseRenderer()
+		{
+			BuildDictionary();
+		}
+
+		protected LicenseRenderer(System.IntPtr ptr) : base(ptr)
+		{
+            BuildDictionary();
+		}
+		
+		private void BuildDictionary() {
+		    if(icons == null) {
+                icons = new Dictionary<string, Gdk.Pixbuf>();
+                icons.Add("by", Gdk.Pixbuf.LoadFromResource("cc-attribution.png"));
+                icons.Add("nd", Gdk.Pixbuf.LoadFromResource("cc-no-derivs.png"));
+                icons.Add("nc", Gdk.Pixbuf.LoadFromResource("cc-noncommercial.png"));
+                icons.Add("pd", Gdk.Pixbuf.LoadFromResource("cc-public-domain.png"));
+                icons.Add("sampling", Gdk.Pixbuf.LoadFromResource("cc-sampling.png"));
+                icons.Add("sampling+", Gdk.Pixbuf.LoadFromResource("cc-sampling-plus.png"));
+                icons.Add("sa", Gdk.Pixbuf.LoadFromResource("cc-share-alike.png"));
+                icons.Add("standard", Gdk.Pixbuf.LoadFromResource("cc-standard.png"));
+		    }
+		}
+		
+		private StateType RendererStateToWidgetState(CellRendererState flags)
+		{
+		    StateType state = StateType.Normal;
+			
+			if((CellRendererState.Insensitive & flags).Equals(
+				CellRendererState.Insensitive)) {
+				state = StateType.Insensitive;
+			} else if((CellRendererState.Selected & flags).Equals( 
+				CellRendererState.Selected)) {
+				state = StateType.Selected;
+			}
+			
+			return state;
+		}
+		
+		protected override void Render(Gdk.Drawable drawable, 
+			Widget widget, Gdk.Rectangle background_area, 
+			Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, 
+			CellRendererState flags)
+		{
+		    Gdk.Window window = drawable as Gdk.Window;
+			StateType state = RendererStateToWidgetState(flags);
+			
+			DrawLicense(window, widget, cell_area, state, flags);
+		}
+		
+		public override void GetSize(Widget widget, ref Gdk.Rectangle cell_area, 
+			out int x_offset, out int y_offset, out int width, out int height)
+		{
+		    height = icons["by"].Height + 2;
+		    width = (icons["by"].Width * MAX_ATTRIBUTES) + 4;
+		    x_offset = 0;
+		    y_offset = 0;
+		}
+	
+		private void DrawLicense(Gdk.Window canvas, Gtk.Widget widget,
+			Gdk.Rectangle area, StateType state, CellRendererState flags)
+		{
+		    if(Track.License == null) {
+		        return;
+		    }
+		    
+		    split_result.Initialize();
+            split_result = (Track.License).Split(splitter, MAX_ATTRIBUTES);
+		    
+		    for(int i = 0; i < split_result.Length; i++) {
+				canvas.DrawPixbuf(widget.Style.TextGC(state), icons[split_result[i]], 0, 0,
+					area.X + (i * icons["by"].Width) + 2, area.Y + 1, 
+					icons["by"].Width, icons["by"].Height,
+					RgbDither.None, 0, 0);
+			}
+		}
+	}
+}
--- /dev/null	2006-05-30 21:15:07.000000000 -0400
+++ src/Banshee.Base/CreativeCommons.cs	2006-07-26 16:08:47.000000000 -0400
@@ -0,0 +1,113 @@
+/***************************************************************************
+ *  CreativeCommons.cs
+ *
+ *  Copyright (C) 2006 Luke Hoersten
+ *  Written by Luke Hoersten <luke.hoersten@gmail.com>
+ ****************************************************************************/
+
+using System;
+using System.IO;
+using System.Xml;
+using System.Xml.XPath;
+using System.Text;
+using System.Security.Cryptography;
+using CreativeCommons;
+
+namespace Banshee.Base
+{
+    public class LicenseParseException : ApplicationException
+    {
+        public LicenseParseException()
+        {
+        }
+        
+        public LicenseParseException(string m) : base(m)
+        {
+        }
+    }
+    
+    public static class CreativeCommons
+    {
+        private const string LICENSES_STRING = "licenses/";
+        private const int LICENSES_LENGTH = 9;
+        
+        private const string HTTP_STRING = "http://";
+        
+        private const string VERIFY_STRING = "verify at ";
+        private const int VERIFY_LENGTH = 10;
+        
+        public static void VerifyLicense(TrackInfo track)
+        {
+            /* Not complete license claim */
+            if(!FullLicenseClaim(track))
+                return;
+
+            /* Verify license */
+            string verified_license_uri = null;
+            if(Verifier.VerifyLicense (track.Uri.AbsolutePath,
+                                       track.LicenseUri, new Uri (track.MetadataUri)))
+                verified_license_uri = track.LicenseUri;
+            else
+                return;
+
+                /* Store license attribute string in track metadata */
+            try {
+                track.License = GetLicenseAttributes(verified_license_uri);
+            } catch(LicenseParseException e) {
+                Console.WriteLine(e);
+                return;
+            }
+        }
+        
+        private static bool FullLicenseClaim(TrackInfo track)
+        {
+            if(track.Copyright == null) {
+                if(track.LicenseUri == null || track.MetadataUri == null) {
+                    return false;
+                }
+            } else {
+                track.LicenseUri = ParseLicenseUri(track.Copyright);
+                track.MetadataUri = ParseMetadataUri(track.Copyright);
+            }
+            return true;
+        }
+        
+        private static string GetLicenseAttributes(string data)
+        {
+            int licenses_index = data.ToLower().IndexOf(LICENSES_STRING);
+            if(licenses_index <= 0) {
+                throw new LicenseParseException("No attributes were found in Copyright tag.");
+            }
+            
+            int attribute_index = licenses_index + LICENSES_LENGTH;
+            return data.Substring(attribute_index, data.IndexOf('/', attribute_index) - attribute_index);
+        }
+        
+        private static string ParseLicenseUri(string data)
+        {
+            int verify_index = (data.ToLower()).IndexOf(VERIFY_STRING);
+            if(verify_index <= 0) {
+                throw new LicenseParseException("No metadata was found in Copyright tag while parsing license URL.");    
+            }
+            
+            int http_index = (data.ToLower()).LastIndexOf(HTTP_STRING, verify_index);
+            if(http_index <= 0) {
+                throw new LicenseParseException("No license was found in Copyright tag.");
+            }
+            
+            /* The -1 is because LastIndexOf adds 1 for arg test */
+            return data.Substring(http_index, (verify_index - http_index) - 1);
+        }
+
+        private static string ParseMetadataUri(string data)
+        {
+            int verify_index = data.ToLower().IndexOf(VERIFY_STRING);
+            if(verify_index <= 0) {
+                throw new LicenseParseException("No metadata was found in Copyright tag at parsing metadata URL.");
+            }
+            
+            int metadata_index = verify_index + VERIFY_LENGTH;
+            return data.Substring(metadata_index, data.Length - (metadata_index));
+        }
+	}
+}
