diff -rN -u -p old-rdbe/bindings/python/rhythmdb.defs new-rdbe/bindings/python/rhythmdb.defs
--- old-rdbe/bindings/python/rhythmdb.defs	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/bindings/python/rhythmdb.defs	2006-05-22 16:14:05.000000000 +1000
@@ -557,6 +557,9 @@
 (define-function rhythmdb_entry_register_type
   (c-name "rhythmdb_entry_register_type")
   (return-type "RhythmDBEntryType_*")
+  (parameters
+    '("const-char*" "name")
+  )
 )
 
 (define-function rhythmdb_entry_song_get_type
diff -rN -u -p old-rdbe/rhythmdb/rhythmdb.c new-rdbe/rhythmdb/rhythmdb.c
--- old-rdbe/rhythmdb/rhythmdb.c	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/rhythmdb/rhythmdb.c	2006-05-22 16:14:04.000000000 +1000
@@ -889,6 +889,11 @@ rhythmdb_error_quark (void)
 	return quark;
 }
 
+/* structure alignment magic, stolen from glib */
+#define STRUCT_ALIGNMENT	(2 * sizeof (gsize))
+#define ALIGN_STRUCT(offset) \
+	((offset + (STRUCT_ALIGNMENT - 1)) & -STRUCT_ALIGNMENT)
+
 /**
  * rhythmdb_entry_allocate:
  * @db: a #RhythmDB.
@@ -907,7 +912,12 @@ RhythmDBEntry *
 rhythmdb_entry_allocate (RhythmDB *db, RhythmDBEntryType type)
 {
 	RhythmDBEntry *ret;
-	ret = g_new0 (RhythmDBEntry, 1);
+	gsize size = sizeof (RhythmDBEntry);
+
+	if (type->entry_type_data_size) {
+		size = ALIGN_STRUCT (sizeof (RhythmDBEntry)) + type->entry_type_data_size;
+	}
+	ret = g_malloc0 (size);
 
 	ret->type = type;
 	ret->title = rb_refstring_ref (db->priv->empty_string);
@@ -916,12 +926,6 @@ rhythmdb_entry_allocate (RhythmDB *db, R
 	ret->album = rb_refstring_ref (db->priv->empty_string);
 	ret->mimetype = rb_refstring_ref (db->priv->octet_stream_str);
 
-	if ((type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST) ||
-	    (type == RHYTHMDB_ENTRY_TYPE_PODCAST_FEED))
-	       ret->podcast = g_new0 (RhythmDBPodcastFields, 1);
-	else
-		ret->podcast = NULL;
-
 	rhythmdb_entry_sync_mirrored (db, ret, RHYTHMDB_PROP_LAST_PLAYED);
 	rhythmdb_entry_sync_mirrored (db, ret, RHYTHMDB_PROP_FIRST_SEEN);
 	
@@ -935,6 +939,26 @@ rhythmdb_entry_allocate (RhythmDB *db, R
 }
 
 /**
+ * rhythmdb_entry_get_type_data:
+ * @entry: a #RhythmDBEntry
+ * @expected_size: expected size of the type-specific data.
+ *
+ * Returns a pointer to the entry's type-specific data, checking that
+ * the size of the data structure matches what is expected.
+ * Callers should use the RHYTHMDB_ENTRY_GET_TYPE_DATA macro for
+ * a slightly more friendly interface to this functionality.
+ */
+gpointer
+rhythmdb_entry_get_type_data (RhythmDBEntry *entry, guint expected_size)
+{
+	g_assert (expected_size == entry->type->entry_type_data_size);
+	gsize offset = ALIGN_STRUCT (sizeof (RhythmDBEntry));
+
+	return (gpointer) (((guint8 *)entry) + offset);
+}
+
+
+/**
  * rhythmdb_entry_insert:
  * @db: a #RhythmDB.
  * @entry: the entry to insert.
@@ -1057,17 +1081,6 @@ rhythmdb_entry_finalize (RhythmDB *db, R
 	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);
-		rb_refstring_unref (entry->podcast->summary);
-		rb_refstring_unref (entry->podcast->lang);
-		rb_refstring_unref (entry->podcast->copyright);
-		rb_refstring_unref (entry->podcast->image);
-		g_free (entry->podcast);
-		entry->podcast = NULL;
-	}
-
 	g_free (entry);
 }
 
@@ -2432,6 +2445,7 @@ rhythmdb_entry_set_internal (RhythmDB *d
 {
 	RhythmDBClass *klass = RHYTHMDB_GET_CLASS (db);
 	gboolean handled;
+	RhythmDBPodcastFields *podcast = NULL;
 
 #ifndef G_DISABLE_ASSERT	
 	switch (G_VALUE_TYPE (value)) {
@@ -2458,6 +2472,10 @@ rhythmdb_entry_set_internal (RhythmDB *d
 	handled = klass->impl_entry_set (db, entry, propid, value);
 
 	if (!handled) {
+		if (entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_FEED ||
+		    entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST)
+			podcast = RHYTHMDB_ENTRY_GET_TYPE_DATA (entry, RhythmDBPodcastFields);
+
 		switch (propid) {
 		case RHYTHMDB_PROP_TYPE:
 			g_assert_not_reached ();
@@ -2557,34 +2575,42 @@ rhythmdb_entry_set_internal (RhythmDB *d
 			entry->hidden = g_value_get_boolean (value);
 			break;
 		case RHYTHMDB_PROP_STATUS:
-			entry->podcast->status = g_value_get_ulong (value);
+			g_assert (podcast);
+			podcast->status = g_value_get_ulong (value);
 			break;
 		case RHYTHMDB_PROP_DESCRIPTION:
-			rb_refstring_unref (entry->podcast->description);
-			entry->podcast->description = rb_refstring_new (g_value_get_string (value));
+			g_assert (podcast);
+			rb_refstring_unref (podcast->description);
+			podcast->description = rb_refstring_new (g_value_get_string (value));
 			break;	
 		case RHYTHMDB_PROP_SUBTITLE:
-			rb_refstring_unref (entry->podcast->subtitle);
-			entry->podcast->subtitle = rb_refstring_new (g_value_get_string (value));
+			g_assert (podcast);
+			rb_refstring_unref (podcast->subtitle);
+			podcast->subtitle = rb_refstring_new (g_value_get_string (value));
 			break;	
 		case RHYTHMDB_PROP_SUMMARY:
-			rb_refstring_unref (entry->podcast->summary);
-			entry->podcast->summary = rb_refstring_new (g_value_get_string (value));
+			g_assert (podcast);
+			rb_refstring_unref (podcast->summary);
+			podcast->summary = rb_refstring_new (g_value_get_string (value));
 			break;	
 		case RHYTHMDB_PROP_LANG:
-			rb_refstring_unref (entry->podcast->lang);
-			entry->podcast->lang = rb_refstring_new (g_value_get_string (value));
+			g_assert (podcast);
+			rb_refstring_unref (podcast->lang);
+			podcast->lang = rb_refstring_new (g_value_get_string (value));
 			break;	
 		case RHYTHMDB_PROP_COPYRIGHT:
-			rb_refstring_unref (entry->podcast->copyright);
-			entry->podcast->copyright = rb_refstring_new (g_value_get_string (value));
+			g_assert (podcast);
+			rb_refstring_unref (podcast->copyright);
+			podcast->copyright = rb_refstring_new (g_value_get_string (value));
 			break;	
 		case RHYTHMDB_PROP_IMAGE:
-			rb_refstring_unref (entry->podcast->image);
-			entry->podcast->image = rb_refstring_new (g_value_get_string (value));
+			g_assert (podcast);
+			rb_refstring_unref (podcast->image);
+			podcast->image = rb_refstring_new (g_value_get_string (value));
 			break;
 		case RHYTHMDB_PROP_POST_TIME:
-			entry->podcast->post_time = g_value_get_ulong (value);
+			g_assert (podcast);
+			podcast->post_time = g_value_get_ulong (value);
 			break;	
 		case RHYTHMDB_NUM_PROPERTIES:
 			g_assert_not_reached ();
@@ -3257,8 +3283,11 @@ rhythmdb_compute_status_normal (gint n_s
 	return ret;
 }
 
+static GHashTable *entry_type_hash = NULL;
+
 /**
  * rhythmdb_entry_register_type:
+ * @name: optional name for the entry type
  *
  * Registers a new #RhythmDBEntryType. This should be called to create a new
  * entry type for non-permanent sources.
@@ -3266,9 +3295,54 @@ rhythmdb_compute_status_normal (gint n_s
  * Returns: the new #RhythmDBEntryType.
  **/
 RhythmDBEntryType
-rhythmdb_entry_register_type (void)
+rhythmdb_entry_register_type (const char *name)
+{
+	RhythmDBEntryType type;
+
+	type = g_new0 (RhythmDBEntryType_, 1);
+	if (name) {
+		type->name = g_strdup (name);
+		if (entry_type_hash == NULL) {
+			entry_type_hash = g_hash_table_new (g_str_hash, g_str_equal);
+		}
+		g_hash_table_insert (entry_type_hash, type->name, type);
+	}
+
+	return type;
+}
+
+static void
+rhythmdb_entry_register_type_alias (RhythmDBEntryType type, const char *name)
+{
+	/* yes, we leak the string */
+	char *dn = g_strdup (name);
+
+	g_hash_table_insert (entry_type_hash, dn, type);
+}
+
+/**
+ * rhythmdb_entry_type_get_by_name:
+ * @name: name of the type to look for
+ *
+ * Locates a #RhythmDBEntryType by name. Returns 
+ * RHYTHMDB_ENTRY_TYPE_INVALID if no entry type 
+ * is registered with the specified name.
+ *
+ * Returns: the #RhythmDBEntryType
+ */
+RhythmDBEntryType
+rhythmdb_entry_type_get_by_name (const char *name)
 {
-	return g_new0(RhythmDBEntryType_, 1);
+	gpointer t;
+
+	if (entry_type_hash == NULL)
+		return RHYTHMDB_ENTRY_TYPE_INVALID;
+
+	t = g_hash_table_lookup (entry_type_hash, name);
+	if (!t)
+		return RHYTHMDB_ENTRY_TYPE_INVALID;
+
+	return (RhythmDBEntryType) t;
 }
 
 static GStaticMutex entry_type_mutex = G_STATIC_MUTEX_INIT;
@@ -3280,7 +3354,8 @@ rhythmdb_entry_song_get_type (void) 
 
 	g_static_mutex_lock (&entry_type_mutex);
 	if (song_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
-		song_type = rhythmdb_entry_register_type ();
+		song_type = rhythmdb_entry_register_type ("song");
+		rhythmdb_entry_register_type_alias (song_type, "0");
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
 
@@ -3294,7 +3369,7 @@ rhythmdb_entry_ignore_get_type (void) 
 
 	g_static_mutex_lock (&entry_type_mutex);
 	if (ignore_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
-		ignore_type = rhythmdb_entry_register_type ();
+		ignore_type = rhythmdb_entry_register_type ("ignore");
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
 
@@ -3307,7 +3382,8 @@ RhythmDBEntryType rhythmdb_entry_iradio_
        
 	g_static_mutex_lock (&entry_type_mutex);
 	if (iradio_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
-		iradio_type = rhythmdb_entry_register_type ();
+		iradio_type = rhythmdb_entry_register_type ("iradio");
+		rhythmdb_entry_register_type_alias (iradio_type, "1");
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
 
@@ -3320,14 +3396,29 @@ _get_podcast_playback_uri (RhythmDBEntry
 	return rhythmdb_entry_dup_string (entry, RHYTHMDB_PROP_MOUNTPOINT);
 }
 
+static void
+_podcast_data_destroy (RhythmDBEntry *entry, gpointer something)
+{
+	RhythmDBPodcastFields *podcast = RHYTHMDB_ENTRY_GET_TYPE_DATA (entry, RhythmDBPodcastFields);
+	rb_refstring_unref (podcast->description);
+	rb_refstring_unref (podcast->subtitle);
+	rb_refstring_unref (podcast->summary);
+	rb_refstring_unref (podcast->lang);
+	rb_refstring_unref (podcast->copyright);
+	rb_refstring_unref (podcast->image);
+}
+
 RhythmDBEntryType rhythmdb_entry_podcast_post_get_type (void) 
 {
 	static RhythmDBEntryType podcast_post_type = RHYTHMDB_ENTRY_TYPE_INVALID;
        
 	g_static_mutex_lock (&entry_type_mutex);
 	if (podcast_post_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
-		podcast_post_type = rhythmdb_entry_register_type ();
+		podcast_post_type = rhythmdb_entry_register_type ("podcast-post");
+		rhythmdb_entry_register_type_alias (podcast_post_type, "2");
 
+		podcast_post_type->entry_type_data_size = sizeof (RhythmDBPodcastFields);
+		podcast_post_type->pre_entry_destroy = (RhythmDBEntryActionFunc) _podcast_data_destroy;
 		podcast_post_type->get_playback_uri = _get_podcast_playback_uri;
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
@@ -3341,7 +3432,11 @@ RhythmDBEntryType rhythmdb_entry_podcast
        
 	g_static_mutex_lock (&entry_type_mutex);
 	if (podcast_feed_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
-		podcast_feed_type = rhythmdb_entry_register_type ();
+		podcast_feed_type = rhythmdb_entry_register_type ("podcast-feed");
+		rhythmdb_entry_register_type_alias (podcast_feed_type, "3");
+
+		podcast_feed_type->entry_type_data_size = sizeof (RhythmDBPodcastFields);
+		podcast_feed_type->pre_entry_destroy = (RhythmDBEntryActionFunc) _podcast_data_destroy;
 	}
 	g_static_mutex_unlock (&entry_type_mutex);
 
@@ -3360,7 +3455,7 @@ RhythmDBEntryType rhythmdb_entry_import_
        
 	g_static_mutex_lock (&entry_type_mutex);
 	if (import_error_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
-		import_error_type = rhythmdb_entry_register_type ();
+		import_error_type = rhythmdb_entry_register_type ("import-error");
 		
 		import_error_type->get_playback_uri = _get_import_error_playback_uri;
 	}
@@ -3478,6 +3573,11 @@ rhythmdb_entry_dup_string (RhythmDBEntry
 const char *
 rhythmdb_entry_get_string (RhythmDBEntry *entry, RhythmDBPropType propid)
 {
+	RhythmDBPodcastFields *podcast = NULL;
+	if (entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_FEED ||
+	    entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST)
+		podcast = RHYTHMDB_ENTRY_GET_TYPE_DATA (entry, RhythmDBPodcastFields);
+
 	switch (propid) {
 	case RHYTHMDB_PROP_TITLE:
 		return rb_refstring_get (entry->title);
@@ -3521,33 +3621,33 @@ rhythmdb_entry_get_string (RhythmDBEntry
 		return NULL;	/* synthetic property */
 	/* Podcast properties */
 	case RHYTHMDB_PROP_DESCRIPTION:
-		if (entry->podcast)
-			return rb_refstring_get (entry->podcast->description);
+		if (podcast)
+			return rb_refstring_get (podcast->description);
 		else
 			return NULL;
 	case RHYTHMDB_PROP_SUBTITLE:
-		if (entry->podcast)
-			return rb_refstring_get (entry->podcast->subtitle);
+		if (podcast)
+			return rb_refstring_get (podcast->subtitle);
 		else
 			return NULL;
 	case RHYTHMDB_PROP_SUMMARY: 
-		if (entry->podcast)
-			return rb_refstring_get (entry->podcast->summary);
+		if (podcast)
+			return rb_refstring_get (podcast->summary);
 		else
 			return NULL;
 	case RHYTHMDB_PROP_LANG:
-		if (entry->podcast)
-			return rb_refstring_get (entry->podcast->lang);
+		if (podcast)
+			return rb_refstring_get (podcast->lang);
 		else
 			return NULL;
 	case RHYTHMDB_PROP_COPYRIGHT:
-		if (entry->podcast)
-			return rb_refstring_get (entry->podcast->copyright);
+		if (podcast)
+			return rb_refstring_get (podcast->copyright);
 		else
 			return NULL;
 	case RHYTHMDB_PROP_IMAGE:
-		if (entry->podcast)
-			return rb_refstring_get (entry->podcast->image);
+		if (podcast)
+			return rb_refstring_get (podcast->image);
 		else
 			return NULL;
 
@@ -3602,6 +3702,11 @@ rhythmdb_entry_get_pointer (RhythmDBEntr
 gulong
 rhythmdb_entry_get_ulong (RhythmDBEntry *entry, RhythmDBPropType propid)
 {
+	RhythmDBPodcastFields *podcast = NULL;
+	if (entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_FEED ||
+	    entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST)
+		podcast = RHYTHMDB_ENTRY_GET_TYPE_DATA (entry, RhythmDBPodcastFields);
+
 	switch (propid) {
 	case RHYTHMDB_PROP_TRACK_NUMBER:
 		return entry->tracknum;
@@ -3632,13 +3737,13 @@ rhythmdb_entry_get_ulong (RhythmDBEntry 
 		else
 			return 0;
 	case RHYTHMDB_PROP_POST_TIME:
-		if (entry->podcast)
-			return entry->podcast->post_time;
+		if (podcast)
+			return podcast->post_time;
 		else
 			return 0;
 	case RHYTHMDB_PROP_STATUS:
-		if (entry->podcast)
-			return entry->podcast->status;		
+		if (podcast)
+			return podcast->status;		
 		else
 			return 0;
 	default:
diff -rN -u -p old-rdbe/rhythmdb/rhythmdb.h new-rdbe/rhythmdb/rhythmdb.h
--- old-rdbe/rhythmdb/rhythmdb.h	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/rhythmdb/rhythmdb.h	2006-05-22 16:14:04.000000000 +1000
@@ -55,6 +55,10 @@ typedef void (*RhythmDBEntryActionFunc) 
 typedef char* (*RhythmDBEntryStringFunc) (RhythmDBEntry *entry, gpointer data);
 
 typedef struct {
+	char 				*name;
+
+	guint				entry_type_data_size;
+
 	/* virtual functions here */
 	RhythmDBEntryActionFunc		post_entry_create;
 	gpointer			post_entry_create_data;
@@ -309,6 +313,9 @@ void		rhythmdb_entry_set_uninserted   (R
 
 char *		rhythmdb_entry_get_playback_uri	(RhythmDBEntry *entry);
 
+gpointer	rhythmdb_entry_get_type_data (RhythmDBEntry *entry, guint expected_size);
+#define		RHYTHMDB_ENTRY_GET_TYPE_DATA(e,t)	((t*)rhythmdb_entry_get_type_data((e),sizeof(t)))
+
 void		rhythmdb_entry_delete	(RhythmDB *db, RhythmDBEntry *entry);
 void            rhythmdb_entry_delete_by_type (RhythmDB *db, 
 					       RhythmDBEntryType type);
@@ -387,7 +394,8 @@ char *		rhythmdb_compute_status_normal		
 							 const char *plural);
 
 
-RhythmDBEntryType rhythmdb_entry_register_type          (void);
+RhythmDBEntryType rhythmdb_entry_register_type          (const char *name);
+RhythmDBEntryType rhythmdb_entry_type_get_by_name       (const char *name);
 
 RhythmDBEntryType rhythmdb_entry_song_get_type          (void);
 RhythmDBEntryType rhythmdb_entry_iradio_get_type        (void);
diff -rN -u -p old-rdbe/rhythmdb/rhythmdb-private.h new-rdbe/rhythmdb/rhythmdb-private.h
--- old-rdbe/rhythmdb/rhythmdb-private.h	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/rhythmdb/rhythmdb-private.h	2006-05-22 16:14:04.000000000 +1000
@@ -101,9 +101,6 @@ struct RhythmDBEntry_ {
 
 	/* visibility (to hide entries on unmounted volumes) */
 	gboolean hidden;
-
-	/*Podcast*/
-	RhythmDBPodcastFields *podcast;
 };
 
 struct RhythmDBPrivate
@@ -215,7 +212,7 @@ void rhythmdb_monitor_uri_path (RhythmDB
 
 /* from rhythmdb-query.c */
 GPtrArray *rhythmdb_query_parse_valist (RhythmDB *db, va_list args);
-
+void       rhythmdb_read_encoded_property (RhythmDB *db, const char *data, RhythmDBPropType propid, GValue *val);
 
 G_END_DECLS
 
diff -rN -u -p old-rdbe/rhythmdb/rhythmdb-query.c new-rdbe/rhythmdb/rhythmdb-query.c
--- old-rdbe/rhythmdb/rhythmdb-query.c	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/rhythmdb/rhythmdb-query.c	2006-05-22 16:14:04.000000000 +1000
@@ -271,99 +271,50 @@ rhythmdb_query_free (GPtrArray *query)
 	g_ptr_array_free (query, TRUE);
 }
 
-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,
+write_encoded_gvalue (RhythmDB *db,
+		      xmlNodePtr node,
+		      RhythmDBPropType propid,
 		      GValue *val)
 {
-	char *strval;
+	const char *strval;
 	xmlChar *quoted;
+	GValue write_value = {0,};
 
-	switch (G_VALUE_TYPE (val)) {
-	case G_TYPE_STRING:
-		strval = g_value_dup_string (val);
-		break;
-	case G_TYPE_BOOLEAN:
-		strval = g_strdup_printf ("%d", g_value_get_boolean (val));
-		break;
-	case G_TYPE_INT:
-		strval = g_strdup_printf ("%d", g_value_get_int (val));
-		break;
-	case G_TYPE_LONG:
-		strval = g_strdup_printf ("%ld", g_value_get_long (val));
-		break;
-	case G_TYPE_ULONG:
-		strval = g_strdup_printf ("%lu", g_value_get_ulong (val));
-		break;
-	case G_TYPE_UINT64:
-		strval = g_strdup_printf ("%" G_GUINT64_FORMAT, g_value_get_uint64 (val));
-		break;
-	case G_TYPE_FLOAT:
-		strval = g_strdup_printf ("%f", g_value_get_float (val));
-		break;
-	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));
+	g_value_init (&write_value, G_TYPE_STRING);
+	/* special-case some properties, but in general use glib value transformation */
+	switch (propid) {
+	case RHYTHMDB_PROP_TYPE:
+		{
+			RhythmDBEntryType type = g_value_get_pointer (val);
+			g_value_set_string (&write_value, type->name);
+		}
 		break;
 	default:
-		g_assert_not_reached ();
-		strval = NULL;
+		if (!g_value_transform (val, &write_value)) {
+			g_warning ("Unable to encode value for property %s", 
+				   rhythmdb_nice_elt_name_from_propid (db, propid));
+			return;
+		}
 		break;
 	}
 
+	strval = g_value_get_string (&write_value);
+
 	quoted = xmlEncodeEntitiesReentrant (NULL, BAD_CAST strval);
-	g_free (strval);
+	g_value_unset (&write_value);
+
 	xmlNodeSetContent (node, quoted);
 	g_free (quoted);
 }
 
-static void
-read_encoded_property (RhythmDB *db,
-		       xmlNodePtr node,
-		       guint propid,
-		       GValue *val)
+void
+rhythmdb_read_encoded_property (RhythmDB *db,
+				const char *content,
+				RhythmDBPropType propid,
+				GValue *val)
 {
-	char *content;
-
 	g_value_init (val, rhythmdb_get_property_type (db, propid));
-
-	content = (char *)xmlNodeGetContent (node);
 	
 	switch (G_VALUE_TYPE (val)) {
 	case G_TYPE_STRING:
@@ -384,7 +335,7 @@ read_encoded_property (RhythmDB *db,
 	case G_TYPE_POINTER:
 		if (propid == RHYTHMDB_PROP_TYPE) {
 			RhythmDBEntryType entry_type;
-			entry_type = entry_type_from_uint (g_ascii_strtoull (content, NULL, 10));
+			entry_type = rhythmdb_entry_type_get_by_name (content);
 			if (entry_type != RHYTHMDB_ENTRY_TYPE_INVALID) {
 				g_value_set_pointer (val, entry_type);
 				break;
@@ -403,10 +354,9 @@ read_encoded_property (RhythmDB *db,
 		g_assert_not_reached ();
 		break;
 	}
-
-	g_free (content);
 }
 
+
 void
 rhythmdb_query_serialize (RhythmDB *db, GPtrArray *query,
 			  xmlNodePtr parent)
@@ -426,32 +376,32 @@ rhythmdb_query_serialize (RhythmDB *db, 
 		case RHYTHMDB_QUERY_PROP_LIKE:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_LIKE, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_PROP_NOT_LIKE:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_NOT_LIKE, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_PROP_PREFIX:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_PREFIX, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_PROP_SUFFIX:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_SUFFIX, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_PROP_EQUALS:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_EQUALS, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_PROP_YEAR_EQUALS:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_YEAR_EQUALS, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_DISJUNCTION:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_DISJ, NULL);
@@ -461,32 +411,32 @@ rhythmdb_query_serialize (RhythmDB *db, 
 		case RHYTHMDB_QUERY_PROP_GREATER:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_GREATER, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_PROP_YEAR_GREATER:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_YEAR_GREATER, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_PROP_LESS:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_LESS, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_PROP_YEAR_LESS:  
 			subnode = xmlNewChild (node, NULL, RB_PARSE_YEAR_LESS, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_PROP_CURRENT_TIME_WITHIN:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_CURRENT_TIME_WITHIN, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		case RHYTHMDB_QUERY_PROP_CURRENT_TIME_NOT_WITHIN:
 			subnode = xmlNewChild (node, NULL, RB_PARSE_CURRENT_TIME_NOT_WITHIN, NULL);
 			xmlSetProp (subnode, RB_PARSE_PROP, rhythmdb_nice_elt_name_from_propid (db, data->propid));
-			write_encoded_gvalue (subnode, data->val);
+			write_encoded_gvalue (db, subnode, data->propid, data->val);
 			break;
 		}		
 	}
@@ -563,6 +513,7 @@ rhythmdb_query_deserialize (RhythmDB *db
 		    || !xmlStrcmp (child->name, RB_PARSE_YEAR_LESS)
 		    || !xmlStrcmp (child->name, RB_PARSE_CURRENT_TIME_WITHIN)
 		    || !xmlStrcmp (child->name, RB_PARSE_CURRENT_TIME_NOT_WITHIN)) {
+			char *content;
 			xmlChar *propstr = xmlGetProp (child, RB_PARSE_PROP);
 			gint propid = rhythmdb_propid_from_nice_elt_name (db, propstr);
 			g_free (propstr);
@@ -572,7 +523,9 @@ rhythmdb_query_deserialize (RhythmDB *db
 			data->propid = propid;
 			data->val = g_new0 (GValue, 1);
 
-			read_encoded_property (db, child, data->propid, data->val);
+			content = (char *)xmlNodeGetContent (child);
+			rhythmdb_read_encoded_property (db, content, data->propid, data->val);
+			g_free (content);
 		} 
 
 		g_ptr_array_add (query, data);
diff -rN -u -p old-rdbe/rhythmdb/rhythmdb-tree.c new-rdbe/rhythmdb/rhythmdb-tree.c
--- old-rdbe/rhythmdb/rhythmdb-tree.c	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/rhythmdb/rhythmdb-tree.c	2006-05-22 16:14:04.000000000 +1000
@@ -266,17 +266,8 @@ rhythmdb_tree_parser_start_element (stru
 			for (; *attrs; attrs +=2) {
 				if (!strcmp (*attrs, "type")) {
 					const char *typename = *(attrs+1);
-					if (!strcmp (typename, "song"))
-						type = RHYTHMDB_ENTRY_TYPE_SONG;
-					else if (!strcmp (typename, "iradio"))
-						type = RHYTHMDB_ENTRY_TYPE_IRADIO_STATION;
-					else if (!strcmp (typename, "podcast-post"))
-						type = RHYTHMDB_ENTRY_TYPE_PODCAST_POST;
-					else if (!strcmp (typename, "podcast-feed"))
-						type = RHYTHMDB_ENTRY_TYPE_PODCAST_FEED;
-					else if (!strcmp (typename, "ignore"))
-						type = RHYTHMDB_ENTRY_TYPE_IGNORE;
-					else
+					type = rhythmdb_entry_type_get_by_name (typename);
+					if (!type)
 						return;
 					type_set = TRUE;
 					break;
@@ -309,24 +300,6 @@ rhythmdb_tree_parser_start_element (stru
 	}
 }
 
-static gulong
-parse_ulong (const char *buffer)
-{
-	guint64 val;
-
-	val = g_ascii_strtoull (buffer, NULL, 10);
-	if (val == G_MAXUINT64)
-		return 0;
-	else
-		return MIN (val, G_MAXUINT32);
-}
-
-static gboolean
-parse_boolean (const char *buffer)
-{
-	return (parse_ulong (buffer) > 0);
-}
-
 static void
 rhythmdb_tree_parser_end_element (struct RhythmDBTreeLoadContext *ctx, const char *name)
 {
@@ -354,13 +327,16 @@ rhythmdb_tree_parser_end_element (struct
 			rb_debug ("pre-Date entry found, causing re-read");
 			ctx->entry->mtime = 0;
 		}
-		if (ctx->entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_FEED && ctx->entry->podcast->post_time == 0) {
+		if (ctx->entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_FEED) {
+			RhythmDBPodcastFields *podcast = RHYTHMDB_ENTRY_GET_TYPE_DATA (ctx->entry, RhythmDBPodcastFields);
 			/* Handle upgrades from 0.9.2.
 			 * Previously, last-seen for podcast feeds was the time of the last post,
 			 * and post-time was unused.  Now, we want last-seen to be the time we
 			 * last updated the feed, and post-time to be the time of the last post.
 			 */
-			ctx->entry->podcast->post_time = ctx->entry->last_seen;
+			if (podcast->post_time == 0) {
+				podcast->post_time = ctx->entry->last_seen;
+			}
 		}
 		
 		if (ctx->entry->location != NULL) {
@@ -403,141 +379,41 @@ rhythmdb_tree_parser_end_element (struct
 	}
 	case RHYTHMDB_TREE_PARSER_STATE_ENTRY_PROPERTY:
 	{
-		/* Handle indexed properties. */
-		switch (ctx->propid)
-		{
-		case RHYTHMDB_PROP_TYPE:
-			g_assert_not_reached ();
-			break;
-		case RHYTHMDB_PROP_TITLE:
-			ctx->entry->title = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_GENRE:
-			ctx->entry->genre = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_ARTIST:
-			ctx->entry->artist = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_ALBUM:
-			ctx->entry->album = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_TRACK_NUMBER:
-			ctx->entry->tracknum = parse_ulong (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_DISC_NUMBER:
-			ctx->entry->discnum = parse_ulong (ctx->buf->str);
-			break;
+		GValue value = {0,};
+		gboolean set = FALSE;
+		gboolean skip = FALSE;
+
+		/* special case some properties for upgrade handling etc. */
+		switch (ctx->propid) {
 		case RHYTHMDB_PROP_DATE:
-		{
-			gulong value = parse_ulong (ctx->buf->str);
-			
-			if (value > 0)
-				g_date_set_julian (&ctx->entry->date, value);
-			else
-				g_date_clear (&ctx->entry->date, 1);
 			ctx->has_date = TRUE;
 			break;
-		}
-		case RHYTHMDB_PROP_DURATION:
-			ctx->entry->duration = parse_ulong (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_FILE_SIZE:
-			ctx->entry->file_size = parse_ulong (ctx->buf->str);
-			break;
 		case RHYTHMDB_PROP_LOCATION:
-			if (ctx->canonicalise_uris)
-				ctx->entry->location = rb_canonicalise_uri (ctx->buf->str);
-			else
-				ctx->entry->location = g_strdup (ctx->buf->str);
+			if (ctx->canonicalise_uris) {
+				char *canon = rb_canonicalise_uri (ctx->buf->str);
+
+				g_value_init (&value, G_TYPE_STRING);
+				g_value_take_string (&value, canon);
+				set = TRUE;
+			}
 			break;
 		case RHYTHMDB_PROP_MOUNTPOINT:
-			/* remove this from old podcast-post entries */
-			if (!g_str_has_prefix (ctx->buf->str, "http://"))
-				ctx->entry->mountpoint = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_MTIME:
-			ctx->entry->mtime = parse_ulong (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_FIRST_SEEN:
-			ctx->entry->first_seen = parse_ulong (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_LAST_SEEN:
-			ctx->entry->last_seen = parse_ulong (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_RATING:
-			ctx->entry->rating = g_ascii_strtod (ctx->buf->str, NULL);
-			break;
-		case RHYTHMDB_PROP_PLAY_COUNT:
-			ctx->entry->play_count = parse_ulong (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_LAST_PLAYED:
-			ctx->entry->last_played = parse_ulong (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_BITRATE:
-			ctx->entry->bitrate = parse_ulong (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_TRACK_GAIN:
-			ctx->entry->track_gain = g_ascii_strtod (ctx->buf->str, NULL);
-			break;
-		case RHYTHMDB_PROP_TRACK_PEAK:
-			ctx->entry->track_peak = g_ascii_strtod (ctx->buf->str, NULL);
-			break;
-		case RHYTHMDB_PROP_ALBUM_GAIN:
-			ctx->entry->album_gain = g_ascii_strtod (ctx->buf->str, NULL);
-			break;
-		case RHYTHMDB_PROP_ALBUM_PEAK:
-			ctx->entry->album_peak = g_ascii_strtod (ctx->buf->str, NULL);
-			break;
-		case RHYTHMDB_PROP_MIMETYPE:
-			ctx->entry->mimetype = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_HIDDEN:
-			ctx->entry->hidden = parse_boolean (ctx->buf->str);
+			/* fix old podcast posts */
+			if (g_str_has_prefix (ctx->buf->str, "http://"))
+				skip = TRUE;
 			break;
-		case RHYTHMDB_PROP_STATUS:
-			ctx->entry->podcast->status = parse_ulong (ctx->buf->str);
-			break;			
-		case RHYTHMDB_PROP_DESCRIPTION:
-			ctx->entry->podcast->description = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_SUBTITLE:
-			ctx->entry->podcast->subtitle = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_SUMMARY:
-			ctx->entry->podcast->summary = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_LANG:
-			ctx->entry->podcast->lang = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_COPYRIGHT:
-			ctx->entry->podcast->copyright = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_IMAGE:
-			ctx->entry->podcast->image = rb_refstring_new (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_POST_TIME:			
-			ctx->entry->podcast->post_time = parse_ulong (ctx->buf->str);
-			break;
-		case RHYTHMDB_PROP_TITLE_SORT_KEY:
-		case RHYTHMDB_PROP_GENRE_SORT_KEY:
-		case RHYTHMDB_PROP_ARTIST_SORT_KEY:
-		case RHYTHMDB_PROP_ALBUM_SORT_KEY:
-		case RHYTHMDB_PROP_TITLE_FOLDED:
-		case RHYTHMDB_PROP_GENRE_FOLDED:
-		case RHYTHMDB_PROP_ARTIST_FOLDED:
-		case RHYTHMDB_PROP_ALBUM_FOLDED:
-		case RHYTHMDB_PROP_LAST_PLAYED_STR:
-		case RHYTHMDB_PROP_PLAYBACK_ERROR:
-		case RHYTHMDB_PROP_FIRST_SEEN_STR:
-		case RHYTHMDB_PROP_LAST_SEEN_STR:
-		case RHYTHMDB_PROP_SEARCH_MATCH:
-		case RHYTHMDB_PROP_YEAR:
-		case RHYTHMDB_NUM_PROPERTIES:
-			g_assert_not_reached ();
+		default:
 			break;
 		}
-			
-		rhythmdb_entry_sync_mirrored (RHYTHMDB (ctx->db), ctx->entry, ctx->propid);
+
+		if (!skip) {
+			if (!set) {
+				rhythmdb_read_encoded_property (RHYTHMDB (ctx->db), ctx->buf->str, ctx->propid, &value);
+			}
+
+			rhythmdb_entry_set_internal (RHYTHMDB (ctx->db), ctx->entry, FALSE, ctx->propid, &value);
+			g_value_unset (&value);
+		}
 
 		ctx->state = RHYTHMDB_TREE_PARSER_STATE_ENTRY;
 		break;
@@ -743,10 +619,15 @@ static void
 save_entry (RhythmDBTree *db, RhythmDBEntry *entry, struct RhythmDBTreeSaveContext *ctx)
 {
 	RhythmDBPropType i;
+	RhythmDBPodcastFields *podcast = NULL;
 
 	if (ctx->error)
 		return;
 
+	if (entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_FEED ||
+	    entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST)
+		podcast = RHYTHMDB_ENTRY_GET_TYPE_DATA (entry, RhythmDBPodcastFields);
+
 	RHYTHMDB_FWRITE_STATICSTR ("  <entry type=\"", ctx->handle, ctx->error);
 
 	if (entry->type == RHYTHMDB_ENTRY_TYPE_SONG) {
@@ -858,36 +739,36 @@ save_entry (RhythmDBTree *db, RhythmDBEn
 			save_entry_boolean (ctx, elt_name, entry->hidden);
 			break;
 		case RHYTHMDB_PROP_STATUS:
-			if (entry->podcast)
-				save_entry_ulong (ctx, elt_name, entry->podcast->status, FALSE);
+			if (podcast)
+				save_entry_ulong (ctx, elt_name, podcast->status, FALSE);
 			break;
 		case RHYTHMDB_PROP_DESCRIPTION:
-			if (entry->podcast && entry->podcast->description)
-				save_entry_string(ctx, elt_name, rb_refstring_get (entry->podcast->description));
+			if (podcast && podcast->description)
+				save_entry_string(ctx, elt_name, rb_refstring_get (podcast->description));
 			break;
 		case RHYTHMDB_PROP_SUBTITLE:
-			if (entry->podcast && entry->podcast->subtitle)
-				save_entry_string(ctx, elt_name, rb_refstring_get (entry->podcast->subtitle));
+			if (podcast && podcast->subtitle)
+				save_entry_string(ctx, elt_name, rb_refstring_get (podcast->subtitle));
 			break;
 		case RHYTHMDB_PROP_SUMMARY:
-			if (entry->podcast && entry->podcast->summary)
-				save_entry_string(ctx, elt_name, rb_refstring_get (entry->podcast->summary));
+			if (podcast && podcast->summary)
+				save_entry_string(ctx, elt_name, rb_refstring_get (podcast->summary));
 			break;
 		case RHYTHMDB_PROP_LANG:
-			if (entry->podcast && entry->podcast->lang)
-				save_entry_string(ctx, elt_name, rb_refstring_get (entry->podcast->lang));
+			if (podcast && podcast->lang)
+				save_entry_string(ctx, elt_name, rb_refstring_get (podcast->lang));
 			break;
 		case RHYTHMDB_PROP_COPYRIGHT:
-			if (entry->podcast && entry->podcast->copyright)
-				save_entry_string(ctx, elt_name, rb_refstring_get (entry->podcast->copyright));
+			if (podcast && podcast->copyright)
+				save_entry_string(ctx, elt_name, rb_refstring_get (podcast->copyright));
 			break;
 		case RHYTHMDB_PROP_IMAGE:
-			if (entry->podcast && entry->podcast->image)
-				save_entry_string(ctx, elt_name, rb_refstring_get (entry->podcast->image));
+			if (podcast && podcast->image)
+				save_entry_string(ctx, elt_name, rb_refstring_get (podcast->image));
 			break;
 		case RHYTHMDB_PROP_POST_TIME:
-			if (entry->podcast)
-				save_entry_ulong (ctx, elt_name, entry->podcast->post_time, FALSE);
+			if (podcast)
+				save_entry_ulong (ctx, elt_name, podcast->post_time, FALSE);
 			break;			
 		case RHYTHMDB_PROP_TITLE_SORT_KEY:
 		case RHYTHMDB_PROP_GENRE_SORT_KEY:
@@ -1221,6 +1102,9 @@ rhythmdb_tree_entry_set (RhythmDB *adb, 
 
 	type = entry->type;
 
+	if (!entry->inserted)
+		return FALSE;
+
 	/* Handle special properties */
 	switch (propid)
 	{
diff -rN -u -p old-rdbe/sources/rb-audiocd-source.c new-rdbe/sources/rb-audiocd-source.c
--- old-rdbe/sources/rb-audiocd-source.c	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/sources/rb-audiocd-source.c	2006-05-22 16:14:04.000000000 +1000
@@ -166,7 +166,7 @@ rb_audiocd_source_new (RBShell *shell,
 
 	g_assert (rb_audiocd_is_volume_audiocd (volume));
 
-	entry_type =  rhythmdb_entry_register_type ();
+	entry_type =  rhythmdb_entry_register_type (NULL);
 
 	device_path = gnome_vfs_volume_get_device_path (volume);
 
diff -rN -u -p old-rdbe/sources/rb-daap-source.c new-rdbe/sources/rb-daap-source.c
--- old-rdbe/sources/rb-daap-source.c	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/sources/rb-daap-source.c	2006-05-22 16:14:04.000000000 +1000
@@ -118,7 +118,7 @@ guint daap_ui_merge_id;
 static RhythmDBEntryType
 rhythmdb_entry_daap_type_new (void)
 {
-	return rhythmdb_entry_register_type ();
+	return rhythmdb_entry_register_type (NULL);
 }
 
 static void
diff -rN -u -p old-rdbe/sources/rb-generic-player-source.c new-rdbe/sources/rb-generic-player-source.c
--- old-rdbe/sources/rb-generic-player-source.c	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/sources/rb-generic-player-source.c	2006-05-22 16:14:04.000000000 +1000
@@ -124,7 +124,7 @@ rb_generic_player_source_new (RBShell *s
 
 	g_assert (rb_generic_player_is_volume_player (volume));
 
-	entry_type =  rhythmdb_entry_register_type ();
+	entry_type =  rhythmdb_entry_register_type (NULL);
 
 	source = RB_GENERIC_PLAYER_SOURCE (g_object_new (RB_TYPE_GENERIC_PLAYER_SOURCE,
 					  "entry-type", entry_type,
diff -rN -u -p old-rdbe/sources/rb-ipod-source.c new-rdbe/sources/rb-ipod-source.c
--- old-rdbe/sources/rb-ipod-source.c	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/sources/rb-ipod-source.c	2006-05-22 16:14:04.000000000 +1000
@@ -205,7 +205,7 @@ rb_ipod_source_new (RBShell *shell, Gnom
 
 	g_assert (rb_ipod_is_volume_ipod (volume));
 
-	entry_type =  rhythmdb_entry_register_type ();
+	entry_type =  rhythmdb_entry_register_type (NULL);
 
 	source = RB_IPOD_SOURCE (g_object_new (RB_TYPE_IPOD_SOURCE,
 					  "entry-type", entry_type,
diff -rN -u -p old-rdbe/sources/rb-nokia770-source.c new-rdbe/sources/rb-nokia770-source.c
--- old-rdbe/sources/rb-nokia770-source.c	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/sources/rb-nokia770-source.c	2006-05-22 16:14:04.000000000 +1000
@@ -77,7 +77,7 @@ rb_nokia770_source_new (RBShell *shell, 
 
 	g_assert (rb_nokia770_is_volume_player (volume));
 
-	entry_type =  rhythmdb_entry_register_type ();
+	entry_type =  rhythmdb_entry_register_type (NULL);
 
 	source = RB_NOKIA770_SOURCE (g_object_new (RB_TYPE_NOKIA770_SOURCE,
 					  "entry-type", entry_type,
diff -rN -u -p old-rdbe/sources/rb-psp-source.c new-rdbe/sources/rb-psp-source.c
--- old-rdbe/sources/rb-psp-source.c	2006-05-22 16:14:04.000000000 +1000
+++ new-rdbe/sources/rb-psp-source.c	2006-05-22 16:14:04.000000000 +1000
@@ -81,7 +81,7 @@ rb_psp_source_new (RBShell *shell, Gnome
 
 	g_assert (rb_psp_is_volume_player (volume));
 
-	entry_type =  rhythmdb_entry_register_type ();
+	entry_type =  rhythmdb_entry_register_type (NULL);
 
 	source = RB_PSP_SOURCE (g_object_new (RB_TYPE_PSP_SOURCE,
 					  "entry-type", entry_type,

