diff -u -u -r1.8 rb.defs
--- bindings/python/rb.defs	9 Apr 2006 13:22:57 -0000	1.8
+++ bindings/python/rb.defs	17 Apr 2006 08:23:21 -0000
@@ -181,7 +181,7 @@
 (define-method guess_type_for_uri
   (of-object "RBShell")
   (c-name "rb_shell_guess_type_for_uri")
-  (return-type "gint")
+  (return-type "RhythmDBEntryType_*")
   (parameters
     '("const-char*" "uri")
   )
@@ -192,7 +192,7 @@
   (c-name "rb_shell_add_uri")
   (return-type "gboolean")
   (parameters
-    '("gint" "entry_type")
+    '("RhythmDBEntryType_*" "entry_type")
     '("const-char*" "uri")
     '("const-char*" "title")
     '("const-char*" "genre")
@@ -272,7 +272,7 @@
   (return-type "none")
   (parameters
     '("RBSource*" "source")
-    '("RhythmDBEntryType" "type")
+    '("RhythmDBEntryType_*" "type")
   )
 )
 
diff -u -u -r1.9 rb.override
--- bindings/python/rb.override	14 Apr 2006 09:14:30 -0000	1.9
+++ bindings/python/rb.override	17 Apr 2006 08:23:22 -0000
@@ -37,6 +37,7 @@
 import gtk.gdk.Pixbuf as PyGdkPixbuf_Type
 
 import rhythmdb.Entry as PyRhythmDBEntry_Type
+import rhythmdb.EntryType as PyRhythmDBEntryType_Type
 import rhythmdb.PropertyModel as PyRhythmDBPropertyModel_Type
 import rhythmdb.PropertyModelColumn as PyRhythmDBPropertyModelColumn_Type
 import rhythmdb.PropType as PyRhythmDBPropType_Type
diff -u -u -r1.6 rhythmdb.defs
--- bindings/python/rhythmdb.defs	14 Apr 2006 09:14:30 -0000	1.6
+++ bindings/python/rhythmdb.defs	17 Apr 2006 08:23:22 -0000
@@ -20,6 +20,12 @@
   (gtype-id "RHYTHMDB_TYPE_ENTRY")
 )
 
+(define-pointer EntryType
+  (in-module "RhythmDB")
+  (c-name "RhythmDBEntryType_")
+  (gtype-id "RHYTHMDB_TYPE_ENTRY_TYPE")
+)
+
 (define-boxed Query
   (in-module "RhythmDB")
   (c-name "RhythmDBQuery")
@@ -183,6 +189,12 @@
   (return-type "GType")
 )
 
+(define-method get_entry_type
+  (of-object "RhythmDBEntry")
+  (c-name "rhythmdb_entry_get_entry_type")
+  (return-type "RhythmDBEntryType_*")
+)
+
 (define-function rhythmdb_new
   (c-name "rhythmdb_new")
   (is-constructor-of "Rhythmdb")
@@ -270,6 +282,15 @@
   )
 )
 
+(define-method get_pointer
+  (of-object "RhythmDBEntry")
+  (c-name "rhythmdb_entry_get_pointer")
+  (return-type "gpointer")
+  (parameters
+    '("RhythmDBPropType" "propid")
+  )
+)
+
 (define-method get_boolean
   (of-object "RhythmDBEntry")
   (c-name "rhythmdb_entry_get_boolean")
@@ -331,7 +352,7 @@
   (c-name "rhythmdb_entry_new")
   (return-type "RhythmDBEntry*")
   (parameters
-    '("RhythmDBEntryType" "type")
+    '("RhythmDBEntryType_*" "type")
     '("const-char*" "uri")
   )
 )
@@ -351,7 +372,7 @@
   (return-type "none")
   (parameters
     '("const-char*" "uri")
-    '("RhythmDBEntryType" "type")
+    '("RhythmDBEntryType_*" "type")
   )
 )
 
@@ -402,7 +423,7 @@
   (c-name "rhythmdb_entry_delete_by_type")
   (return-type "none")
   (parameters
-    '("RhythmDBEntryType" "type")
+    '("RhythmDBEntryType_*" "type")
   )
 )
 
@@ -544,37 +565,37 @@
 
 (define-function rhythmdb_entry_register_type
   (c-name "rhythmdb_entry_register_type")
-  (return-type "RhythmDBEntryType")
+  (return-type "RhythmDBEntryType_*")
 )
 
 (define-function rhythmdb_entry_song_get_type
   (c-name "rhythmdb_entry_song_get_type")
-  (return-type "RhythmDBEntryType")
+  (return-type "RhythmDBEntryType_*")
 )
 
 (define-function rhythmdb_entry_iradio_get_type
   (c-name "rhythmdb_entry_iradio_get_type")
-  (return-type "RhythmDBEntryType")
+  (return-type "RhythmDBEntryType_*")
 )
 
 (define-function rhythmdb_entry_podcast_post_get_type
   (c-name "rhythmdb_entry_podcast_post_get_type")
-  (return-type "RhythmDBEntryType")
+  (return-type "RhythmDBEntryType_*")
 )
 
 (define-function rhythmdb_entry_podcast_feed_get_type
   (c-name "rhythmdb_entry_podcast_feed_get_type")
-  (return-type "RhythmDBEntryType")
+  (return-type "RhythmDBEntryType_*")
 )
 
 (define-function rhythmdb_entry_import_error_get_type
   (c-name "rhythmdb_entry_import_error_get_type")
-  (return-type "RhythmDBEntryType")
+  (return-type "RhythmDBEntryType_*")
 )
 
 (define-function rhythmdb_entry_ignore_get_type
   (c-name "rhythmdb_entry_ignore_get_type")
-  (return-type "RhythmDBEntryType")
+  (return-type "RhythmDBEntryType_*")
 )
 
 
diff -u -u -r1.7 rhythmdb.override
--- bindings/python/rhythmdb.override	14 Apr 2006 09:14:30 -0000	1.7
+++ bindings/python/rhythmdb.override	17 Apr 2006 08:23:22 -0000
@@ -30,6 +30,7 @@
   *_quark
 %%
 ignore
+  rhythmdb_entry_get_pointer
   rhythmdb_entry_get_string
   rhythmdb_entry_get_boolean
   rhythmdb_entry_get_uint64
diff -u -u -r1.22 rb-daap-connection.c
--- daapsharing/rb-daap-connection.c	9 Apr 2006 11:02:15 -0000	1.22
+++ daapsharing/rb-daap-connection.c	17 Apr 2006 08:23:23 -0000
@@ -654,11 +654,11 @@
 							       G_PARAM_READWRITE));
 	g_object_class_install_property (object_class,
 					 PROP_ENTRY_TYPE,
-					 g_param_spec_uint ("entry-type",
-							    "entry type",
-							    "RhythmDBEntryType",
-							    0, G_MAXINT, 0,
-							    G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+					 g_param_spec_pointer ("entry-type",
+							       "entry type",
+							       "RhythmDBEntryType",
+							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
 	g_object_class_install_property (object_class,
 					 PROP_PASSWORD_PROTECTED,
 					 g_param_spec_boolean ("password-protected",
@@ -723,6 +723,7 @@
 	connection->priv = RB_DAAP_CONNECTION_GET_PRIVATE (connection);
 
 	connection->priv->username = g_strdup_printf ("Rhythmbox_%s", VERSION);
+	connection->priv->db_type = RHYTHMDB_ENTRY_TYPE_INVALID;
 }
 
 
@@ -1944,7 +1945,7 @@
 		priv->password_protected = g_value_get_boolean (value);
 		break;
 	case PROP_ENTRY_TYPE:
-		priv->db_type = g_value_get_uint (value);
+		priv->db_type = g_value_get_pointer (value);
 		break;
 	case PROP_CALLBACK:
 		priv->callback = g_value_get_pointer (value);
@@ -1987,7 +1988,7 @@
 		g_value_set_pointer (value, priv->callback_user_data);
 		break;
 	case PROP_ENTRY_TYPE:
-		g_value_set_uint (value, priv->db_type);
+		g_value_set_pointer (value, priv->db_type);
 		break;
 	case PROP_PASSWORD_PROTECTED:
 		g_value_set_boolean (value, priv->password_protected);
diff -u -u -r1.19 rb-daap-share.c
--- daapsharing/rb-daap-share.c	18 Feb 2006 13:12:02 -0000	1.19
+++ daapsharing/rb-daap-share.c	17 Apr 2006 08:23:24 -0000
@@ -1472,7 +1472,7 @@
 		   RhythmDBEntry *entry,
 		   RBDAAPShare *share)
 {
-	RhythmDBEntryType type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
+	RhythmDBEntryType type = rhythmdb_entry_get_entry_type (entry);
 	gboolean hidden = rhythmdb_entry_get_boolean (entry, RHYTHMDB_PROP_HIDDEN);
 
 	if (type == rhythmdb_entry_song_get_type () && !hidden && g_hash_table_lookup (share->priv->entry_to_id, entry) == NULL) {
diff -u -u -r1.42 rb-podcast-manager.c
--- podcast/rb-podcast-manager.c	16 Apr 2006 17:15:01 -0000	1.42
+++ podcast/rb-podcast-manager.c	17 Apr 2006 08:23:27 -0000
@@ -435,9 +435,8 @@
 {
 	gulong status;
 	const gchar *file_name;
-	gulong type;
+	RhythmDBEntryType type = rhythmdb_entry_get_entry_type (entry);
 
-	type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
 	g_assert (type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST);
 
 	status = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_STATUS);
@@ -701,7 +700,7 @@
 
 	RhythmDBEntry *entry = rhythmdb_entry_lookup_by_location (pd->priv->db, valid_url);
 	if (entry) {
-		if (rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE) != RHYTHMDB_ENTRY_TYPE_PODCAST_FEED) {
+		if (rhythmdb_entry_get_entry_type (entry) != RHYTHMDB_ENTRY_TYPE_PODCAST_FEED) {
 			/* added as something else, probably iradio */
 			rb_error_dialog (NULL, _("URL already added"),
 					 _("The URL \"%s\" has already been added as a radio station. "
@@ -902,8 +901,8 @@
 static void
 rb_podcast_manager_db_entry_added_cb (RBPodcastManager *pd, RhythmDBEntry *entry)
 {
+	RhythmDBEntryType type = rhythmdb_entry_get_entry_type (entry);
 
-	gulong type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
 	if (type != RHYTHMDB_ENTRY_TYPE_PODCAST_POST)
 		return;
 	
@@ -1215,8 +1214,7 @@
 rb_podcast_manager_db_entry_deleted_cb (RBPodcastManager *pd,
 					RhythmDBEntry *entry)
 {
-
-	gulong type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
+	RhythmDBEntryType type = rhythmdb_entry_get_entry_type (entry);
 
 	if ((type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST) && (pd->priv->remove_files == TRUE)) {
 		const char *file_name;
@@ -1388,7 +1386,7 @@
 	/* processing podcast head */
 	entry = rhythmdb_entry_lookup_by_location (db, (gchar *)data->url);
 	if (entry) {
-		if (rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE) != RHYTHMDB_ENTRY_TYPE_PODCAST_FEED)
+		if (rhythmdb_entry_get_entry_type (entry) != RHYTHMDB_ENTRY_TYPE_PODCAST_FEED)
 			return;
 			
 		rb_debug ("Head found");
diff -u -u -r1.5 rhythmdb-private.h
--- rhythmdb/rhythmdb-private.h	29 Mar 2006 10:12:28 -0000	1.5
+++ rhythmdb/rhythmdb-private.h	17 Apr 2006 08:23:27 -0000
@@ -54,7 +54,7 @@
 	gboolean inserted;
 	gint refcount;
 	void *data;
-	gulong type;
+	RhythmDBEntryType type;
 	
 	/* metadata */
 	RBRefString *title;
diff -u -u -r1.100 rhythmdb-tree.c
--- rhythmdb/rhythmdb-tree.c	19 Mar 2006 11:30:39 -0000	1.100
+++ rhythmdb/rhythmdb-tree.c	17 Apr 2006 08:23:29 -0000
@@ -260,7 +260,7 @@
 	case RHYTHMDB_TREE_PARSER_STATE_RHYTHMDB:
 	{
 		if (!strcmp (name, "entry")) {
-			RhythmDBEntryType type = -1;
+			RhythmDBEntryType type = RHYTHMDB_ENTRY_TYPE_INVALID;
 			gboolean type_set = FALSE;
 			for (; *attrs; attrs +=2) {
 				if (!strcmp (*attrs, "type")) {
@@ -1432,7 +1432,13 @@
 				    g_value_get_double (data->val)) \
 					return FALSE; \
 				break; \
+                        case G_TYPE_POINTER: \
+                                if (rhythmdb_entry_get_pointer (entry, data->propid) OP \
+                                    g_value_get_pointer (data->val)) \
+                                        return FALSE; \
+                                break; \
 			default: \
+                                g_warning ("Unexpected type: %s", g_type_name (rhythmdb_get_property_type (db, data->propid))); \
 				g_assert_not_reached (); \
 			}
 
@@ -1791,7 +1797,7 @@
 		
 		g_ptr_array_remove_index_fast (query, type_query_idx);
 		
-		etype = g_value_get_ulong (qdata->val);
+		etype = g_value_get_pointer (qdata->val);
 		genres = get_genres_hash_for_type (db, etype);
 		if (genres != NULL) {
 			conjunctive_query_genre (db, genres, traversal_data);
diff -u -u -r1.202 rhythmdb.c
--- rhythmdb/rhythmdb.c	14 Apr 2006 01:15:19 -0000	1.202
+++ rhythmdb/rhythmdb.c	17 Apr 2006 08:23:29 -0000
@@ -863,7 +863,7 @@
 static void
 sync_entry_changed (RhythmDBEntry *entry, GSList *changes, RhythmDB *db)
 {
-	if (rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE) == RHYTHMDB_ENTRY_TYPE_SONG) {
+	if (rhythmdb_entry_get_entry_type (entry) == RHYTHMDB_ENTRY_TYPE_SONG) {
 		GSList *t;
 		for (t = changes; t; t = t->next) {
 			RBMetaDataField field;
@@ -914,7 +914,7 @@
 		if (!g_str_has_prefix (uri, "file://"))
 			entry->hidden = TRUE;
 
-		queue_stat_uri (uri, data->db, -1);
+		queue_stat_uri (uri, data->db, RHYTHMDB_ENTRY_TYPE_INVALID);
 	}
 
 	data->entries = g_list_prepend (data->entries, entry);
@@ -1065,6 +1065,10 @@
 	
 	/* The refcount is initially 0, we want to set it to 1 */
 	g_atomic_int_inc (&ret->refcount);
+
+	if (type->post_entry_create)
+		(type->post_entry_create)(ret);
+
 	return ret;
 }
 
@@ -1175,8 +1179,14 @@
 }
 
 static void
-rhythmdb_entry_finalize (RhythmDBEntry *entry)
+rhythmdb_entry_finalize (RhythmDB *db, RhythmDBEntry *entry)
 {
+	RhythmDBEntryType type;
+
+	type = rhythmdb_entry_get_entry_type (entry);
+	if (type->pre_entry_destroy)
+		(type->pre_entry_destroy)(entry);
+
 	g_free (entry->location);
 	g_free (entry->playback_error);
 	if (entry->date)
@@ -1186,7 +1196,7 @@
 	rb_refstring_unref (entry->artist);
 	rb_refstring_unref (entry->album);
 	rb_refstring_unref (entry->mimetype);
-	
+
 	if (entry->podcast) {
 		rb_refstring_unref (entry->podcast->description);
 		rb_refstring_unref (entry->podcast->subtitle);
@@ -1197,12 +1207,7 @@
 		g_free (entry->podcast);
 		entry->podcast = NULL;
 	}
-}
 
-static void
-rhythmdb_entry_destroy (RhythmDB *db, RhythmDBEntry *entry)
-{
-	rhythmdb_entry_finalize (entry);
 	g_free (entry);
 }
 
@@ -1218,7 +1223,7 @@
 rhythmdb_entry_unref (RhythmDB *db, RhythmDBEntry *entry)
 {
 	if (g_atomic_int_dec_and_test (&entry->refcount))
-		rhythmdb_entry_destroy (db, entry);
+		rhythmdb_entry_finalize (db, entry);
 }
 
 /**
@@ -1566,7 +1571,7 @@
 	if (entry) {
 		time_t mtime = (time_t) entry->mtime;
 
-		if ((event->entry_type != -1) && (entry->type != event->entry_type))
+		if ((event->entry_type != RHYTHMDB_ENTRY_TYPE_INVALID) && (entry->type != event->entry_type))
 			g_warning ("attempt to use same location in multiple entry types");
 
 		if (entry->type == RHYTHMDB_ENTRY_TYPE_IGNORE)
@@ -1669,7 +1674,7 @@
 	
 	entry = rhythmdb_entry_lookup_by_location (db, event->real_uri);
 	if (entry) {
-		RhythmDBEntryType entry_type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
+		RhythmDBEntryType entry_type = rhythmdb_entry_get_entry_type (entry);
 		if (entry_type != RHYTHMDB_ENTRY_TYPE_IMPORT_ERROR &&
 		    entry_type != RHYTHMDB_ENTRY_TYPE_IGNORE) {
 			/* FIXME we've successfully read this file before.. so what should we do? */
@@ -1758,8 +1763,8 @@
 	entry = rhythmdb_entry_lookup_by_location (db, event->real_uri);
 
 	if (entry) {
-		if ((event->entry_type != -1) &&
-		    (rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE) != event->entry_type)) {
+		if ((event->entry_type != RHYTHMDB_ENTRY_TYPE_INVALID) &&
+		    (rhythmdb_entry_get_entry_type (entry) != event->entry_type)) {
 			/* switching from IGNORE to SONG or vice versa, recreate the entry */
 			rhythmdb_entry_delete (db, entry);
 			rhythmdb_add_timeout_commit (db, FALSE);
@@ -1768,7 +1773,7 @@
 	}
 	
 	if (!entry) {
-		if (event->entry_type == -1)
+		if (event->entry_type == RHYTHMDB_ENTRY_TYPE_INVALID)
 			event->entry_type = RHYTHMDB_ENTRY_TYPE_SONG;
 		entry = rhythmdb_entry_new (db, event->entry_type, event->real_uri);
 		if (entry == NULL) {
@@ -1796,7 +1801,7 @@
 		g_value_unset (&value);
 	}
 
-	if ((event->entry_type != -1) && (entry->type != event->entry_type))
+	if ((event->entry_type != RHYTHMDB_ENTRY_TYPE_INVALID) && (entry->type != event->entry_type))
 		g_warning ("attempt to use same location in multiple entry types");
 
 	/* mtime */
@@ -1856,7 +1861,7 @@
 	action = g_new0 (RhythmDBAction, 1);
 	action->type = RHYTHMDB_ACTION_LOAD;
 	action->uri = g_strdup (event->uri);
-	action->entry_type = -1;
+	action->entry_type = RHYTHMDB_ENTRY_TYPE_INVALID;
 	g_async_queue_push (db->priv->action_queue, action);
 }
 
@@ -2314,7 +2319,7 @@
 				load_action = g_new0 (RhythmDBAction, 1);
 				load_action->type = RHYTHMDB_ACTION_LOAD;
 				load_action->uri = g_strdup (action->uri);
-				load_action->entry_type = -1;
+				load_action->entry_type = RHYTHMDB_ENTRY_TYPE_INVALID;
 				g_async_queue_push (db->priv->action_queue, load_action);
 				
 				data = g_new0 (RhythmDBSaveErrorData, 1);
@@ -2358,7 +2363,7 @@
 void
 rhythmdb_add_uri (RhythmDB *db, const char *uri)
 {
-	rhythmdb_add_uri_with_type (db, uri, -1);
+	rhythmdb_add_uri_with_type (db, uri, RHYTHMDB_ENTRY_TYPE_INVALID);
 }
 
 void
@@ -3301,6 +3306,40 @@
 	return -1;
 }
 
+static char *
+entry_type_to_string (RhythmDBEntryType type)
+{
+	if (type == RHYTHMDB_ENTRY_TYPE_SONG) {
+		return g_strdup ("0");
+	} else if (type == RHYTHMDB_ENTRY_TYPE_IRADIO_STATION) {
+		return g_strdup ("1");
+	} else if (type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST) {
+		return g_strdup ("2");
+	} else if (type == RHYTHMDB_ENTRY_TYPE_PODCAST_FEED) {
+		return g_strdup ("3");
+	}
+	g_assert_not_reached ();
+}
+
+static RhythmDBEntryType
+entry_type_from_uint (unsigned int type) 
+{
+	switch (type) {
+	case 0:
+		return RHYTHMDB_ENTRY_TYPE_SONG;
+	case 1:
+		return RHYTHMDB_ENTRY_TYPE_IRADIO_STATION;
+	case 2:
+		return RHYTHMDB_ENTRY_TYPE_PODCAST_POST;
+	case 3:
+		return RHYTHMDB_ENTRY_TYPE_PODCAST_FEED;
+	default:
+		g_assert_not_reached ();
+	}
+
+	return RHYTHMDB_ENTRY_TYPE_INVALID;
+}
+
 static void
 write_encoded_gvalue (xmlNodePtr node,
 		      GValue *val)
@@ -3333,6 +3372,9 @@
 	case G_TYPE_DOUBLE:
 		strval = g_strdup_printf ("%f", g_value_get_double (val));
 		break;
+	case G_TYPE_POINTER:
+		strval = entry_type_to_string (g_value_get_pointer (val));
+		break;
 	default:
 		g_assert_not_reached ();
 		strval = NULL;
@@ -3373,7 +3415,25 @@
 	case G_TYPE_DOUBLE:
 		g_value_set_double (val, g_ascii_strtod (content, NULL));
 		break;
+	case G_TYPE_POINTER:
+		if (propid == RHYTHMDB_PROP_TYPE) {
+			RhythmDBEntryType entry_type;
+			entry_type = entry_type_from_uint (g_ascii_strtoull (content, NULL, 10));
+			if (entry_type != RHYTHMDB_ENTRY_TYPE_INVALID) {
+				g_value_set_pointer (val, entry_type);
+				break;
+			} else {
+				g_warning ("Unexpected entry type");
+				/* Fall through */
+			}
+		}
+		/* Falling through on purpose to get an assert for unexpected 
+		 * cases 
+		 */
 	default:
+		g_warning ("Attempt to read '%s' of unhandled type %s", 
+			   rhythmdb_nice_elt_name_from_propid (db, propid),
+			   g_type_name (G_VALUE_TYPE (val)));
 		g_assert_not_reached ();
 		break;
 	}
@@ -3792,7 +3852,7 @@
 			* parenthesis.
 			* Finally, there is the XML element name in brackets.
 			*/
-			ENUM_ENTRY (RHYTHMDB_PROP_TYPE, "Type of entry (gulong) [type]"),
+			ENUM_ENTRY (RHYTHMDB_PROP_TYPE, "Type of entry (gpointer) [type]"),
 			ENUM_ENTRY (RHYTHMDB_PROP_TITLE, "Title (gchararray) [title]"),
 			ENUM_ENTRY (RHYTHMDB_PROP_GENRE, "Genre (gchararray) [genre]"),
 			ENUM_ENTRY (RHYTHMDB_PROP_ARTIST, "Artist (gchararray) [artist]"),
@@ -3968,8 +4028,6 @@
 	return ret;
 }
 
-static gint last_entry_type = 0;
-
 /**
  * rhythmdb_entry_register_type:
  *
@@ -3981,7 +4039,7 @@
 RhythmDBEntryType
 rhythmdb_entry_register_type (void)
 {
-	return g_atomic_int_exchange_and_add (&last_entry_type, 1);		
+	return g_new0(RhythmDBEntryType_, 1);
 }
 
 static GStaticMutex entry_type_mutex = G_STATIC_MUTEX_INIT;
@@ -3989,10 +4047,10 @@
 RhythmDBEntryType 
 rhythmdb_entry_song_get_type (void) 
 {
-	static RhythmDBEntryType song_type = -1;
+	static RhythmDBEntryType song_type = RHYTHMDB_ENTRY_TYPE_INVALID;
 
 	g_static_mutex_lock (&entry_type_mutex);
-	if (song_type == -1) {
+	if (song_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
 		song_type = rhythmdb_entry_register_type ();
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
@@ -4003,10 +4061,10 @@
 RhythmDBEntryType 
 rhythmdb_entry_ignore_get_type (void) 
 {
-	static RhythmDBEntryType ignore_type = -1;
+	static RhythmDBEntryType ignore_type = RHYTHMDB_ENTRY_TYPE_INVALID;
 
 	g_static_mutex_lock (&entry_type_mutex);
-	if (ignore_type == -1) {
+	if (ignore_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
 		ignore_type = rhythmdb_entry_register_type ();
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
@@ -4016,10 +4074,10 @@
 
 RhythmDBEntryType rhythmdb_entry_iradio_get_type (void) 
 {
-	static RhythmDBEntryType iradio_type = -1;
+	static RhythmDBEntryType iradio_type = RHYTHMDB_ENTRY_TYPE_INVALID;
        
 	g_static_mutex_lock (&entry_type_mutex);
-	if (iradio_type == -1) {
+	if (iradio_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
 		iradio_type = rhythmdb_entry_register_type ();
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
@@ -4029,10 +4087,10 @@
 
 RhythmDBEntryType rhythmdb_entry_podcast_post_get_type (void) 
 {
-	static RhythmDBEntryType podcast_post_type = -1;
+	static RhythmDBEntryType podcast_post_type = RHYTHMDB_ENTRY_TYPE_INVALID;
        
 	g_static_mutex_lock (&entry_type_mutex);
-	if (podcast_post_type == -1) {
+	if (podcast_post_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
 		podcast_post_type = rhythmdb_entry_register_type ();
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
@@ -4042,10 +4100,10 @@
 
 RhythmDBEntryType rhythmdb_entry_podcast_feed_get_type (void) 
 {
-	static RhythmDBEntryType podcast_feed_type = -1;
+	static RhythmDBEntryType podcast_feed_type = RHYTHMDB_ENTRY_TYPE_INVALID;
        
 	g_static_mutex_lock (&entry_type_mutex);
-	if (podcast_feed_type == -1) {
+	if (podcast_feed_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
 		podcast_feed_type = rhythmdb_entry_register_type ();
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
@@ -4055,10 +4113,10 @@
 
 RhythmDBEntryType rhythmdb_entry_import_error_get_type (void) 
 {
-	static RhythmDBEntryType import_error_type = -1;
+	static RhythmDBEntryType import_error_type = RHYTHMDB_ENTRY_TYPE_INVALID;
        
 	g_static_mutex_lock (&entry_type_mutex);
-	if (import_error_type == -1) {
+	if (import_error_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
 		import_error_type = rhythmdb_entry_register_type ();
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
@@ -4606,12 +4664,28 @@
 	}
 }
 
-gulong
-rhythmdb_entry_get_ulong (RhythmDBEntry *entry, RhythmDBPropType propid)
+RhythmDBEntryType
+rhythmdb_entry_get_entry_type (RhythmDBEntry *entry)
+{
+	return entry->type;
+}
+
+gpointer
+rhythmdb_entry_get_pointer (RhythmDBEntry *entry, RhythmDBPropType propid)
 {
 	switch (propid) {
 	case RHYTHMDB_PROP_TYPE:
 		return entry->type;
+	default:
+		g_assert_not_reached ();
+		return NULL;
+	}
+}
+
+gulong
+rhythmdb_entry_get_ulong (RhythmDBEntry *entry, RhythmDBPropType propid)
+{
+	switch (propid) {
 	case RHYTHMDB_PROP_TRACK_NUMBER:
 		return entry->tracknum;
 	case RHYTHMDB_PROP_DISC_NUMBER:
@@ -4690,6 +4764,18 @@
 
 	if (G_UNLIKELY (type == 0)) {
 		type = g_pointer_type_register_static ("RhythmDBEntry");
+	}
+
+	return type;
+}
+
+GType
+rhythmdb_entry_type_get_type (void)
+{
+	static GType type = 0;
+
+	if (G_UNLIKELY (type == 0)) {
+		type = g_pointer_type_register_static ("RhythmDBEntryType");
 	}
 
 	return type;
diff -u -u -r1.79 rhythmdb.h
--- rhythmdb/rhythmdb.h	14 Apr 2006 01:15:19 -0000	1.79
+++ rhythmdb/rhythmdb.h	17 Apr 2006 08:23:29 -0000
@@ -53,8 +53,17 @@
 #define RHYTHMDB_QUERY(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), RHYTHMDB_TYPE_QUERY, RhythmDBQuery))
 #define RHYTHMDB_IS_QUERY(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), RHYTHMDB_TYPE_QUERY))
 
-
-typedef gint32 RhythmDBEntryType;
+typedef struct {
+	/* virtual functions here */
+	void (*post_entry_create) (RhythmDBEntry *entry);
+	void (*pre_entry_destroy) (RhythmDBEntry *entry);
+} RhythmDBEntryType_;
+typedef RhythmDBEntryType_ *RhythmDBEntryType;
+
+GType rhythmdb_entry_type_get_type (void);
+#define RHYTHMDB_TYPE_ENTRY_TYPE	(rhythmdb_entry_type_get_type ())
+#define RHYTHMDB_ENTRY_TYPE(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), RHYTHMDB_TYPE_ENTRY_TYPE, RhythmDBEntryType_))
+#define RHYTHMDB_IS_ENTRY_TYPE(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), RHYTHMDB_TYPE_ENTRY_TYPE))
 
 #define RHYTHMDB_ENTRY_TYPE_SONG (rhythmdb_entry_song_get_type ())
 #define RHYTHMDB_ENTRY_TYPE_IRADIO_STATION (rhythmdb_entry_iradio_get_type ())
@@ -62,6 +71,7 @@
 #define RHYTHMDB_ENTRY_TYPE_PODCAST_FEED (rhythmdb_entry_podcast_feed_get_type ())
 #define RHYTHMDB_ENTRY_TYPE_IMPORT_ERROR (rhythmdb_entry_import_error_get_type ())
 #define RHYTHMDB_ENTRY_TYPE_IGNORE (rhythmdb_entry_ignore_get_type ())
+#define RHYTHMDB_ENTRY_TYPE_INVALID (GINT_TO_POINTER (-1))
 
 typedef enum
 {
@@ -177,9 +187,13 @@
 const char *rhythmdb_entry_get_string	(RhythmDBEntry *entry, RhythmDBPropType propid);
 char *rhythmdb_entry_dup_string	(RhythmDBEntry *entry, RhythmDBPropType propid);
 gboolean rhythmdb_entry_get_boolean	(RhythmDBEntry *entry, RhythmDBPropType propid);
-guint64 rhythmdb_entry_get_uint64		(RhythmDBEntry *entry, RhythmDBPropType propid);
+guint64 rhythmdb_entry_get_uint64	(RhythmDBEntry *entry, RhythmDBPropType propid);
 gulong rhythmdb_entry_get_ulong		(RhythmDBEntry *entry, RhythmDBPropType propid);
-double rhythmdb_entry_get_double		(RhythmDBEntry *entry, RhythmDBPropType propid);
+double rhythmdb_entry_get_double	(RhythmDBEntry *entry, RhythmDBPropType propid);
+gpointer rhythmdb_entry_get_pointer     (RhythmDBEntry *entry, RhythmDBPropType propid);
+
+RhythmDBEntryType rhythmdb_entry_get_entry_type (RhythmDBEntry *entry);
+
 
 
 typedef enum
diff -u -u -r1.16 rb-audioscrobbler.c
--- shell/rb-audioscrobbler.c	25 Mar 2006 03:37:22 -0000	1.16
+++ shell/rb-audioscrobbler.c	17 Apr 2006 08:23:30 -0000
@@ -933,7 +933,7 @@
 				   RhythmDBEntry *entry,
 				   RBAudioscrobbler *audioscrobbler)
 {
-	gulong type;
+	RhythmDBEntryType type;
 	gchar *old_artist;
 	gchar *old_album;
 	gchar *old_title;
@@ -941,7 +941,7 @@
 	if (entry == NULL)
 		return;
 
-	type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
+	type = rhythmdb_entry_get_entry_type (entry);
 	if (type == RHYTHMDB_ENTRY_TYPE_IRADIO_STATION ||
 	    type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST ||
 	    type == RHYTHMDB_ENTRY_TYPE_PODCAST_FEED)
diff -u -u -r1.94 rb-playlist-manager.c
--- shell/rb-playlist-manager.c	3 Mar 2006 00:33:37 -0000	1.94
+++ shell/rb-playlist-manager.c	17 Apr 2006 08:23:31 -0000
@@ -588,12 +588,12 @@
 			  const char *genre, RBPlaylistManager *mgr)
 {
 	char *uri = rb_canonicalise_uri (uri_maybe);
-	gint entry_type;
+	RhythmDBEntryType entry_type;
 
 	g_return_if_fail (uri != NULL);
 
 	entry_type = rb_shell_guess_type_for_uri (mgr->priv->shell, uri);
-	if (entry_type < 0) {
+	if (entry_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
 		return;
 	}
 
diff -u -u -r1.235 rb-shell-player.c
--- shell/rb-shell-player.c	17 Apr 2006 04:04:50 -0000	1.235
+++ shell/rb-shell-player.c	17 Apr 2006 08:23:33 -0000
@@ -1029,10 +1029,10 @@
 static gboolean
 rb_shell_player_open_entry (RBShellPlayer *player, RhythmDBEntry *entry, GError **error)
 {
-	gulong type;
+	RhythmDBEntryType type;
 	const char *location;
 
-	type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
+	type = rhythmdb_entry_get_entry_type (entry);
 	if (type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST)
 		location = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_MOUNTPOINT);
 	else
@@ -1880,6 +1880,7 @@
 	RhythmDBEntry *prev_entry = NULL;
 	GError *error = NULL;
 	gboolean source_set = FALSE;
+	RhythmDBEntryType entry_type;
 
 	g_return_if_fail (entry != NULL);
 
@@ -1889,12 +1890,14 @@
 	if (rhythmdb_entry_get_boolean (entry, RHYTHMDB_PROP_HIDDEN))
 		return;
 
+	entry_type = rhythmdb_entry_get_entry_type (entry);
+
 	/* don't play import error entries */
-	if (rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE) == RHYTHMDB_ENTRY_TYPE_IMPORT_ERROR)
+	if (entry_type == RHYTHMDB_ENTRY_TYPE_IMPORT_ERROR)
 		return;
 
 	/* ensure the podcast has been downloaded */
-	if (rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE) == RHYTHMDB_ENTRY_TYPE_PODCAST_POST) {
+	if (entry_type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST) {
 		if (!rb_podcast_manager_entry_downloaded (entry))
 			return;
 	}
@@ -2521,7 +2524,7 @@
         RhythmDBPropType entry_field = 0;
         gboolean changed = FALSE;
         gboolean set_field = FALSE;
-	gulong type;
+	RhythmDBEntryType type;
 	
         rb_debug ("info: %d", field);
 
@@ -2541,7 +2544,7 @@
                 goto out_unlock;
         }
 
-	type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
+	type = rhythmdb_entry_get_entry_type (entry);
 	if (type != RHYTHMDB_ENTRY_TYPE_IRADIO_STATION) {
 		rb_debug ("Got info_available but entry isn't an iradio station");
 		goto out_unlock;
diff -u -u -r1.434 rb-shell.c
--- shell/rb-shell.c	17 Apr 2006 04:19:55 -0000	1.434
+++ shell/rb-shell.c	17 Apr 2006 08:23:35 -0000
@@ -1715,7 +1715,7 @@
 rb_shell_get_source_by_entry_type (RBShell *shell,
 				   RhythmDBEntryType type)
 {
-	return g_hash_table_lookup (shell->priv->sources_hash, GINT_TO_POINTER (type));
+	return g_hash_table_lookup (shell->priv->sources_hash, type);
 }
 
 void
@@ -1727,9 +1727,8 @@
 		shell->priv->sources_hash = g_hash_table_new (g_direct_hash, 
 							      g_direct_equal);
 	}
-	g_assert (g_hash_table_lookup (shell->priv->sources_hash, GINT_TO_POINTER (type)) == NULL);
-	g_hash_table_insert (shell->priv->sources_hash, 
-			     GINT_TO_POINTER (type), source);
+	g_assert (g_hash_table_lookup (shell->priv->sources_hash, type) == NULL);
+	g_hash_table_insert (shell->priv->sources_hash, type, source);
 }
 
 
@@ -1869,7 +1868,7 @@
 		if (entry == NULL)
 			return;
 
-		entry_type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
+		entry_type = rhythmdb_entry_get_entry_type (entry);
 		source = rb_shell_get_source_by_entry_type (shell, entry_type);
 		songs = rb_source_get_entry_view (source);
 
@@ -1905,10 +1904,10 @@
 
 	g_signal_emit_by_name (RB_REMOTE_PROXY (shell), "song_changed", &song);
 
-	/* Translators: Trackname by Artist */
-	notifytitle = g_strdup_printf (_("%s by %s"),
-				       song.title, song.artist);
-	rb_shell_hidden_notify (shell, 4000, _("Now Playing"), NULL, notifytitle);
+	/* Translators: by Artist from Album*/
+	notifytitle = g_strdup_printf (_("by %s from %s"),
+				       song.artist, song.album);
+	rb_shell_hidden_notify (shell, 4000, song.title, NULL, notifytitle);
 	g_free (notifytitle);
 }
 
@@ -1993,9 +1992,9 @@
 					RBShell *shell)
 {
 	char *song;
-	g_object_get (G_OBJECT (player), "stream-song", &song, NULL);
+	g_object_get (G_OBJECT (player), "stream-song", &song, NULL);	
 	if (song) {
-		rb_shell_hidden_notify (shell, 4000, _("Now Playing"), NULL, song);
+		rb_shell_hidden_notify (shell, 4000, song, NULL, NULL);
 		g_free (song);
 	}
 }
@@ -2803,7 +2802,7 @@
 	     shell->priv->queue_as_sidebar) ||
 	     source == NULL) {
 		RhythmDBEntryType entry_type;
-		entry_type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
+		entry_type = rhythmdb_entry_get_entry_type (entry);
 		source = rb_shell_get_source_by_entry_type (shell, entry_type); 
 	}
 	if (source == NULL)
@@ -2971,23 +2970,23 @@
 	rb_shell_load_uri (shell, uri, play, NULL);
 }
 
-gint
+RhythmDBEntryType
 rb_shell_guess_type_for_uri (RBShell *shell,
 			     const char *uri)
 {
 	GnomeVFSURI *vfs_uri;
-	gint entry_type = RHYTHMDB_ENTRY_TYPE_SONG;
+	RhythmDBEntryType entry_type = RHYTHMDB_ENTRY_TYPE_SONG;
 	const char *scheme;
 	const char *path;
 	const char *pathend;
 
 	if (uri == NULL)
-		return -1;
+		return RHYTHMDB_ENTRY_TYPE_INVALID;
 
 	vfs_uri = gnome_vfs_uri_new (uri);
 	if (vfs_uri == NULL) {
 		rb_debug ("Invalid uri: %s", uri);
-		return -1;
+		return RHYTHMDB_ENTRY_TYPE_INVALID;
 	}
 	scheme = gnome_vfs_uri_get_scheme (vfs_uri);
 	path = gnome_vfs_uri_get_scheme (vfs_uri);
@@ -3017,7 +3016,7 @@
  */
 gboolean
 rb_shell_add_uri (RBShell *shell,
-		  gint entrytype,
+		  RhythmDBEntryType entrytype,
 		  const char *uri,
 		  const char *title,
 		  const char *genre,
@@ -3063,12 +3062,11 @@
 			  const char *genre,
 			  PlaylistParseData *data)
 {
-	gint entry_type;
+	RhythmDBEntryType entry_type;
 
 	g_return_if_fail (uri != NULL);
 	
 	entry_type = rb_shell_guess_type_for_uri (data->shell, uri);
-	g_return_if_fail (entry_type >= 0);
 	
 	if (entry_type != RHYTHMDB_ENTRY_TYPE_IRADIO_STATION)
 		data->iradio_playlist = FALSE;
@@ -3127,7 +3125,7 @@
 							     uri, error))
 				return FALSE;
 		} else {
-			gint entrytype;
+			RhythmDBEntryType entrytype;
 
 			if (result == TOTEM_PL_PARSER_RESULT_SUCCESS) {
 				rb_debug ("adding %s as an iradio playlist", uri);
diff -u -u -r1.27 rb-shell.h
--- shell/rb-shell.h	12 Apr 2006 11:13:29 -0000	1.27
+++ shell/rb-shell.h	17 Apr 2006 08:23:35 -0000
@@ -71,10 +71,10 @@
 
 gboolean        rb_shell_present        (RBShell *shell, guint32 timestamp, GError **error);
 
-gint            rb_shell_guess_type_for_uri (RBShell *shell, const char *uri);
+RhythmDBEntryType rb_shell_guess_type_for_uri (RBShell *shell, const char *uri);
 
 gboolean        rb_shell_add_uri        (RBShell *shell,
-					 gint entry_type,
+					 RhythmDBEntryType entry_type,
 					 const char *uri,
 					 const char *title,
 					 const char *genre,
diff -u -u -r1.11 rb-auto-playlist-source.c
--- sources/rb-auto-playlist-source.c	14 Apr 2006 09:14:31 -0000	1.11
+++ sources/rb-auto-playlist-source.c	17 Apr 2006 08:23:35 -0000
@@ -442,7 +442,7 @@
 		GPtrArray *query;
 		
 		g_object_get (G_OBJECT (source), "entry-type", &qtype, NULL);
-		if (qtype == -1)
+		if (qtype == RHYTHMDB_ENTRY_TYPE_INVALID)
 			qtype = RHYTHMDB_ENTRY_TYPE_SONG;
 
 		query = rhythmdb_query_parse (db,
diff -u -u -r1.3 rb-browser-source.c
--- sources/rb-browser-source.c	14 Apr 2006 09:14:31 -0000	1.3
+++ sources/rb-browser-source.c	17 Apr 2006 08:23:35 -0000
@@ -211,13 +211,10 @@
 
 	g_object_class_install_property (object_class,
 					 PROP_ENTRY_TYPE,
-					 g_param_spec_uint ("entry-type",
-							    "Entry type",
-							    "Type of the entries which should be displayed by this source",
-							    0,
-							    G_MAXINT,
-							    RHYTHMDB_ENTRY_TYPE_SONG,
-							    G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+					 g_param_spec_pointer ("entry-type",
+							       "Entry type",
+							       "Type of the entries which should be displayed by this source",
+							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	g_object_class_install_property (object_class,
 					 PROP_SORTING_KEY,
@@ -238,6 +235,12 @@
 	source->priv->search_prop = RHYTHMDB_PROP_SEARCH_MATCH;
 
 	source->priv->vbox = gtk_vbox_new (FALSE, 5);
+
+	/* Default value, should be overridden at object construction by the 
+	 * "entry-type" property
+	 */
+	source->priv->entry_type = RHYTHMDB_ENTRY_TYPE_INVALID;
+
 	gtk_container_add (GTK_CONTAINER (source), source->priv->vbox);
 }
 
@@ -477,7 +480,7 @@
 
 	switch (prop_id) {
 	case PROP_ENTRY_TYPE:
-		source->priv->entry_type = g_value_get_uint (value);
+		source->priv->entry_type = g_value_get_pointer (value);
 		break;
 	case PROP_SORTING_KEY:
 		g_free (source->priv->sorting_key);
@@ -499,7 +502,7 @@
 
 	switch (prop_id) {
 	case PROP_ENTRY_TYPE:
-		g_value_set_uint (value, source->priv->entry_type);
+		g_value_set_pointer (value, source->priv->entry_type);
 		break;
 	case PROP_SORTING_KEY:
 		g_value_set_string (value, source->priv->sorting_key);
diff -u -u -r1.117 rb-iradio-source.c
--- sources/rb-iradio-source.c	17 Apr 2006 04:04:51 -0000	1.117
+++ sources/rb-iradio-source.c	17 Apr 2006 08:23:36 -0000
@@ -195,13 +195,11 @@
 
 	g_object_class_install_property (object_class,
 					 PROP_ENTRY_TYPE,
-					 g_param_spec_uint ("entry-type",
-							    "Entry type",
-							    "Type of the entries which should be displayed by this source",
-							    0,
-							    G_MAXINT,
-							    RHYTHMDB_ENTRY_TYPE_IRADIO_STATION,
-							    G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+					 g_param_spec_pointer ("entry-type",
+							       "Entry type",
+							       "Type of the entries which should be displayed by this source",
+							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
 
 	g_type_class_add_private (klass, sizeof (RBIRadioSourcePrivate));
 }
@@ -227,6 +225,7 @@
 	if (pixbuf != NULL) {
 		g_object_unref (pixbuf);
 	}
+	source->priv->entry_type = RHYTHMDB_ENTRY_TYPE_IRADIO_STATION;
 }
 
 static void
@@ -371,7 +370,7 @@
 
 	switch (prop_id) {
 	case PROP_ENTRY_TYPE:
-		source->priv->entry_type = g_value_get_uint (value);
+		source->priv->entry_type = g_value_get_pointer (value);
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -389,7 +388,7 @@
 
 	switch (prop_id) {
 	case PROP_ENTRY_TYPE:
-		g_value_set_uint (value, source->priv->entry_type);
+		g_value_set_pointer (value, source->priv->entry_type);
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
diff -u -u -r1.163 rb-library-source.c
--- sources/rb-library-source.c	16 Apr 2006 12:09:19 -0000	1.163
+++ sources/rb-library-source.c	17 Apr 2006 08:23:36 -0000
@@ -1140,7 +1140,7 @@
 
 		rb_debug ("pasting entry %s", rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_LOCATION));
 
-		entry_type = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE);
+		entry_type = rhythmdb_entry_get_entry_type (entry);
 		/* see if the responsible source lets us copy */
 		if (!rb_source_can_copy (rb_shell_get_source_by_entry_type (shell, entry_type)))
 			continue;
diff -u -u -r1.1 rb-missing-files-source.c
--- sources/rb-missing-files-source.c	22 Feb 2006 13:07:24 -0000	1.1
+++ sources/rb-missing-files-source.c	17 Apr 2006 08:23:36 -0000
@@ -109,15 +109,13 @@
 	source_class->impl_have_url = (RBSourceFeatureFunc) rb_false_function;
 	source_class->impl_get_status = impl_get_status;
 	
+
 	g_object_class_install_property (object_class,
 					 PROP_ENTRY_TYPE,
-					 g_param_spec_uint ("entry-type",
-							    "Entry type",
-							    "Type of the entries which should be displayed by this source",
-							    0,
-							    G_MAXINT,
-							    RHYTHMDB_ENTRY_TYPE_SONG,
-							    G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+					 g_param_spec_pointer ("entry-type",
+							       "Entry type",
+							       "Type of the entries which should be displayed by this source",
+							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 	
 	g_type_class_add_private (klass, sizeof (RBMissingFilesSourcePrivate));
 }
@@ -139,6 +137,8 @@
 	if (pixbuf != NULL) {
 		g_object_unref (pixbuf);
 	}
+
+	source->priv->entry_type = RHYTHMDB_ENTRY_TYPE_SONG;
 }
 
 static GObject *
@@ -247,7 +247,7 @@
 	switch (prop_id)
 	{
 	case PROP_ENTRY_TYPE:
-		source->priv->entry_type = g_value_get_uint (value);
+		source->priv->entry_type = g_value_get_pointer (value);
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -266,7 +266,7 @@
 	switch (prop_id)
 	{
 	case PROP_ENTRY_TYPE:
-		g_value_set_uint (value, source->priv->entry_type);
+		g_value_set_pointer (value, source->priv->entry_type);
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
diff -u -u -r1.114 rb-playlist-source.c
--- sources/rb-playlist-source.c	14 Apr 2006 09:14:32 -0000	1.114
+++ sources/rb-playlist-source.c	17 Apr 2006 08:23:37 -0000
@@ -185,13 +185,13 @@
 							       "whether this playlist is attached to the local library",
 							       TRUE,
 							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
 	g_object_class_install_property (object_class,
 					 PROP_ENTRY_TYPE,
-					 g_param_spec_int ("entry-type",
-							   "entry-type",
-							   "The entry type this playlist accepts",
-							   -1, G_MAXINT, -1,
-							   G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+					 g_param_spec_pointer ("entry-type",
+							       "Entry type",
+							       "Type of the entries which should be displayed by this playlist",
+							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	g_type_class_add_private (klass, sizeof (RBPlaylistSourcePrivate));
 }
@@ -200,6 +200,11 @@
 rb_playlist_source_init (RBPlaylistSource *source)
 {
 	source->priv = RB_PLAYLIST_SOURCE_GET_PRIVATE (source);
+
+	/* Default value, should be overridden at object construction by the 
+	 * "entry-type" property
+	 */
+	source->priv->entry_type = RHYTHMDB_ENTRY_TYPE_INVALID;
 }
 
 static GObject *
@@ -322,7 +327,7 @@
 		source->priv->is_local = g_value_get_boolean (value);
 		break;
 	case PROP_ENTRY_TYPE:
-		source->priv->entry_type = g_value_get_int (value);
+		source->priv->entry_type = g_value_get_pointer (value);
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -350,7 +355,7 @@
 		g_value_set_boolean (value, source->priv->is_local);
 		break;
 	case PROP_ENTRY_TYPE:
-		g_value_set_int (value, source->priv->entry_type);
+		g_value_set_pointer (value, source->priv->entry_type);
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
diff -u -u -r1.63 rb-podcast-source.c
--- sources/rb-podcast-source.c	14 Apr 2006 09:14:32 -0000	1.63
+++ sources/rb-podcast-source.c	17 Apr 2006 08:23:37 -0000
@@ -368,13 +368,10 @@
 	
 	g_object_class_install_property (object_class,
 					 PROP_ENTRY_TYPE,
-					 g_param_spec_uint ("entry-type",
-							    "Entry type",
-							    "Type of the entries which should be displayed by this source",
-							    0,
-							    G_MAXINT,
-							    RHYTHMDB_ENTRY_TYPE_PODCAST_POST,
-							    G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+					 g_param_spec_pointer ("entry-type",
+							       "Entry type",
+							       "Type of the entries which should be displayed by this source",
+							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	g_object_class_install_property (object_class,
 					 PROP_PODCAST_MANAGER,
@@ -414,6 +411,8 @@
 	}
 
 	gtk_widget_destroy (dummy);
+
+	source->priv->entry_type = RHYTHMDB_ENTRY_TYPE_PODCAST_POST;
 }
 
 static void
@@ -772,7 +771,7 @@
 
 	switch (prop_id) {
 	case PROP_ENTRY_TYPE:
-		source->priv->entry_type = g_value_get_uint (value);
+		source->priv->entry_type = g_value_get_pointer (value);
 		break;
 	case PROP_PODCAST_MANAGER:
 		source->priv->podcast_mg = g_value_get_object (value);
@@ -793,7 +792,7 @@
 
 	switch (prop_id) {
 	case PROP_ENTRY_TYPE:
-		g_value_set_uint (value, source->priv->entry_type);
+		g_value_set_pointer (value, source->priv->entry_type);
 		break;
 	case PROP_PODCAST_MANAGER:
 		g_value_set_object (value, source->priv->podcast_mg);
diff -u -u -r1.18 rb-static-playlist-source.c
--- sources/rb-static-playlist-source.c	14 Apr 2006 09:14:32 -0000	1.18
+++ sources/rb-static-playlist-source.c	17 Apr 2006 08:23:37 -0000
@@ -562,8 +562,8 @@
 		RhythmDBEntryType entry_type;
 
 		g_object_get (G_OBJECT (source), "entry-type", &entry_type, NULL);
-		if (entry_type != -1 &&
-		    rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TYPE) != entry_type) {
+		if (entry_type != RHYTHMDB_ENTRY_TYPE_INVALID &&
+		    rhythmdb_entry_get_entry_type (entry) != entry_type) {
 			rb_debug ("attempting to add an entry of the wrong type to playlist");
 			return;
 		}
