Index: rb-daap-connection.c
===================================================================
--- rb-daap-connection.c	(revision 5543)
+++ rb-daap-connection.c	(working copy)
@@ -781,7 +781,12 @@
 		return;
 	}
 
+	gint old_revision = priv->revision_number;
 	priv->revision_number = g_value_get_int (&(item->content));
+
+	if (priv->state == DAAP_REFRESH && old_revision != priv->revision_number)
+		priv->state = DAAP_GET_REVISION_NUMBER;
+
 	rb_daap_connection_state_done (connection, TRUE);
 }
 
@@ -1454,6 +1459,10 @@
 			/* uhh.. */
 			rb_debug ("This should never happen.");
 			break;
+		case DAAP_REFRESH:
+			rb_debug ("Setting state back to done after refresh");
+			priv->state = DAAP_DONE;
+			break;
 
 		default:
 			/* in most states, we just move on to the next */
@@ -1630,6 +1639,18 @@
 		rb_daap_connection_finish (connection);
 
 		break;
+
+	case DAAP_REFRESH:
+		rb_debug("Checking for new database revision");
+		path = g_strdup_printf ("/update?session-id=%u&revision-number=1", priv->session_id);
+		if (! http_get (connection, path, TRUE, priv->daap_version, 0, FALSE,
+			       (RBDAAPResponseHandler) handle_update, FALSE)) {
+			rb_debug ("Could not get server database revision number");
+			rb_daap_connection_state_done (connection, FALSE);
+		}
+		g_free (path);
+		break;
+
 	}
 
 	return FALSE;
@@ -1696,6 +1717,13 @@
 	return connection->priv->playlists;
 }
 
+gboolean
+rb_daap_connection_check_revision (RBDAAPConnection *connection) {
+	connection->priv->state = DAAP_REFRESH;
+	rb_daap_connection_do_something(connection);
+	return TRUE;
+}
+
 static void
 rb_daap_connection_dispose (GObject *object)
 {
Index: rb-daap-source.c
===================================================================
--- rb-daap-source.c	(revision 5543)
+++ rb-daap-source.c	(working copy)
@@ -431,6 +431,7 @@
 		source->priv->connection_status = _("Retrieving songs from music share");
 		break;
 	case DAAP_LOGOUT:
+	case DAAP_REFRESH:
 	case DAAP_DONE:
 		source->priv->connection_status = NULL;
 		break;
@@ -536,6 +537,7 @@
 		RBSource *playlist_source;
 
 		playlist_source = rb_static_playlist_source_new (shell, playlist->name, FALSE, entry_type);
+
 		g_list_foreach (playlist->uris, (GFunc)_add_location_to_playlist, playlist_source);
 
 		rb_shell_append_source (shell, playlist_source, RB_SOURCE (daap_source));
@@ -544,6 +546,8 @@
 
 	g_object_unref (shell);
 	g_boxed_free (RHYTHMDB_TYPE_ENTRY_TYPE, entry_type);
+
+	g_timeout_add(10000,(GSourceFunc) rb_daap_connection_check_revision, RB_DAAP_CONNECTION (daap_source->priv->connection));
 }
 
 static void
Index: rb-daap-connection.h
===================================================================
--- rb-daap-connection.h	(revision 5543)
+++ rb-daap-connection.h	(working copy)
@@ -54,7 +54,8 @@
 	DAAP_GET_PLAYLISTS,
 	DAAP_GET_PLAYLIST_ENTRIES,
 	DAAP_LOGOUT,
-	DAAP_DONE
+	DAAP_DONE,
+	DAAP_REFRESH
 } RBDAAPConnectionState;
 
 typedef struct {
@@ -107,6 +108,8 @@
 
 GSList *           rb_daap_connection_get_playlists   (RBDAAPConnection         *connection);
 
+gboolean               rb_daap_connection_check_revision (RBDAAPConnection *connection);
+
 G_END_DECLS
 
 #endif /* __RB_DAAP_CONNECTION_H */
