Index: rhythmdb/rhythmdb-tree.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/rhythmdb/rhythmdb-tree.c,v
retrieving revision 1.89
diff -u -u -p -r1.89 rhythmdb-tree.c
--- rhythmdb/rhythmdb-tree.c	3 Feb 2006 09:26:24 -0000	1.89
+++ rhythmdb/rhythmdb-tree.c	4 Feb 2006 12:31:59 -0000
@@ -295,6 +295,12 @@ parse_ulong (const char *buffer)
 		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)
 {
@@ -429,6 +435,9 @@ rhythmdb_tree_parser_end_element (struct
 		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);
+			break;
 		case RHYTHMDB_PROP_STATUS:
 			ctx->entry->podcast->status = parse_ulong (ctx->buf->str);
 			break;			
@@ -462,7 +471,6 @@ rhythmdb_tree_parser_end_element (struct
 		case RHYTHMDB_PROP_ARTIST_FOLDED:
 		case RHYTHMDB_PROP_ALBUM_FOLDED:
 		case RHYTHMDB_PROP_LAST_PLAYED_STR:
-		case RHYTHMDB_PROP_HIDDEN:
 		case RHYTHMDB_PROP_PLAYBACK_ERROR:
 		case RHYTHMDB_PROP_FIRST_SEEN_STR:
 		case RHYTHMDB_PROP_SEARCH_MATCH:
@@ -631,6 +639,13 @@ save_entry_ulong (struct RhythmDBTreeSav
 }
 
 static void
+save_entry_boolean (struct RhythmDBTreeSaveContext *ctx,
+		    const xmlChar *elt_name, gboolean val)
+{
+	save_entry_ulong (ctx, elt_name, val ? 1 : 0, TRUE);
+}
+
+static void
 save_entry_uint64 (struct RhythmDBTreeSaveContext *ctx, const xmlChar *elt_name,
 		   guint64 num)
 {
@@ -775,6 +790,9 @@ save_entry (RhythmDBTree *db, RhythmDBEn
 		case RHYTHMDB_PROP_LAST_PLAYED:
 			save_entry_ulong (ctx, elt_name, entry->last_played, FALSE);
 			break;
+		case RHYTHMDB_PROP_HIDDEN:
+			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);
@@ -816,7 +834,6 @@ save_entry (RhythmDBTree *db, RhythmDBEn
 		case RHYTHMDB_PROP_ARTIST_FOLDED:
 		case RHYTHMDB_PROP_ALBUM_FOLDED:
 		case RHYTHMDB_PROP_LAST_PLAYED_STR:
-		case RHYTHMDB_PROP_HIDDEN:
 		case RHYTHMDB_PROP_PLAYBACK_ERROR:
 		case RHYTHMDB_PROP_FIRST_SEEN_STR:
 		case RHYTHMDB_PROP_SEARCH_MATCH:
Index: rhythmdb/rhythmdb.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/rhythmdb/rhythmdb.c,v
retrieving revision 1.166
diff -u -u -p -r1.166 rhythmdb.c
--- rhythmdb/rhythmdb.c	4 Feb 2006 04:11:04 -0000	1.166
+++ rhythmdb/rhythmdb.c	4 Feb 2006 12:32:02 -0000
@@ -843,13 +843,19 @@ rhythmdb_commit_internal (RhythmDB *db, 
 	for (tem = db->priv->added_entries; tem; tem = tem->next) {
 		RhythmDBEntry *entry = tem->data;
 
-		rhythmdb_emit_entry_added (db, entry);
 		if (entry->type == RHYTHMDB_ENTRY_TYPE_SONG) {
 			const gchar *uri;
+
 			uri = rhythmdb_entry_get_string (entry, 
 							 RHYTHMDB_PROP_LOCATION);
+
+			/* always start remote files hidden*/
+			if (!rb_uri_is_local (uri))
+				entry->hidden = TRUE;
+
 			queue_stat_uri (uri, db, -1);
 		}
+		rhythmdb_emit_entry_added (db, entry);
 		g_assert (entry->inserted == FALSE);
 		entry->inserted = TRUE;
 	}
@@ -3506,7 +3512,7 @@ rhythmdb_prop_get_type (void)
 			ENUM_ENTRY (RHYTHMDB_PROP_ALBUM_FOLDED, "Album folded (gchararray) [album-folded]"),
 			ENUM_ENTRY (RHYTHMDB_PROP_LAST_PLAYED_STR, "Last Played (gchararray) [last-played-str]"),
 			ENUM_ENTRY (RHYTHMDB_PROP_PLAYBACK_ERROR, "Playback error string (gchararray) [playback-error]"),
-			ENUM_ENTRY (RHYTHMDB_PROP_HIDDEN, "Visibility (gboolean) [visibility]"),
+			ENUM_ENTRY (RHYTHMDB_PROP_HIDDEN, "Hidden (gboolean) [hidden]"),
 			ENUM_ENTRY (RHYTHMDB_PROP_FIRST_SEEN_STR, "Time Added to Library (gchararray) [first-seen-str]"),
 			ENUM_ENTRY (RHYTHMDB_PROP_SEARCH_MATCH, "Search matching key (gchararray) [search-match]"),
 
