Index: sources/rb-podcast-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-podcast-source.c,v
retrieving revision 1.58
diff -u -r1.58 rb-podcast-source.c
--- sources/rb-podcast-source.c	1 Mar 2006 12:27:03 -0000	1.58
+++ sources/rb-podcast-source.c	6 Mar 2006 00:20:43 -0000
@@ -771,6 +771,9 @@
 impl_search (RBSource *asource, const char *search_text)
 {
 	RBPodcastSource *source = RB_PODCAST_SOURCE (asource);
+	RhythmDBPropertyModel *prop_model;
+	RhythmDBQueryModel *query_model;
+	GPtrArray *query;   
 
 	if (source->priv->initialized) {
 		if (search_text == NULL && source->priv->search_text == NULL)
@@ -791,6 +794,53 @@
 	else
 		source->priv->search_text = NULL;
 	rb_podcast_source_do_query (source, RB_PODCAST_QUERY_TYPE_SEARCH);
+
+	prop_model = rb_property_view_get_model (source->priv->feeds);
+
+	/* construct a query model based only on search text */
+	query_model = rhythmdb_query_model_new_empty (source->priv->db);
+
+	query = rhythmdb_query_parse (source->priv->db,
+				      RHYTHMDB_QUERY_PROP_EQUALS,
+				      RHYTHMDB_PROP_TYPE,
+				      RHYTHMDB_ENTRY_TYPE_PODCAST_FEED,
+				      RHYTHMDB_QUERY_END);
+
+	if (source->priv->search_text)  {
+		GPtrArray *subquery;
+		RhythmDBEntryType entry_type;
+		
+		g_object_get (G_OBJECT (source), "entry-type", &entry_type, NULL);
+
+		subquery = rhythmdb_query_parse (source->priv->db,
+						 RHYTHMDB_QUERY_PROP_EQUALS,
+						 RHYTHMDB_PROP_TYPE,
+						 entry_type,
+						 RHYTHMDB_QUERY_PROP_LIKE,
+						 RHYTHMDB_PROP_ALBUM_FOLDED,
+						 source->priv->search_text,
+						 RHYTHMDB_QUERY_DISJUNCTION,
+						 RHYTHMDB_QUERY_PROP_LIKE,
+						 RHYTHMDB_PROP_TITLE_FOLDED,
+						 source->priv->search_text,
+						 RHYTHMDB_QUERY_END);
+
+		rhythmdb_query_append (source->priv->db,
+				       query,
+				       RHYTHMDB_QUERY_SUBQUERY,
+				       subquery,
+				       RHYTHMDB_QUERY_END);
+	}
+
+
+	rhythmdb_do_full_query_parsed (source->priv->db, 
+				       RHYTHMDB_QUERY_RESULTS (query_model), 
+				       query); 
+	rhythmdb_query_free (query);  
+	g_object_set (G_OBJECT (prop_model), "query-model", query_model, NULL);
+	
+	/* use prop model to constrain browser */
+	rb_property_view_set_model (source->priv->feeds, prop_model);
 
 	rb_source_notify_filter_changed (RB_SOURCE (source));
 }
