commit d8b46a03de8edd555d48a5de700ee7e184cb86b8
Author: vrishab <vrishab.in@gmail.com>
Date:   Mon Oct 24 11:59:50 2016 +0530

    Do not transmit unplayable rhythmdb entries to the DMAP client

diff --git a/plugins/daap/rb-rhythmdb-dmap-db-adapter.c b/plugins/daap/rb-rhythmdb-dmap-db-adapter.c
index c1777e6..70b3de4 100644
--- a/plugins/daap/rb-rhythmdb-dmap-db-adapter.c
+++ b/plugins/daap/rb-rhythmdb-dmap-db-adapter.c
@@ -68,7 +68,17 @@ foreach_adapter (RhythmDBEntry *entry, gpointer data)
 	gulong id;
 	DMAPRecord *record;
 	ForeachAdapterData *foreach_adapter_data;
-	
+	gchar *playback_uri;
+
+	/* Skip hidden entries */
+	if (rhythmdb_entry_get_boolean (entry, RHYTHMDB_PROP_HIDDEN))
+		return;
+
+	/* Skip entries with no playback uri */
+	playback_uri = rhythmdb_entry_get_playback_uri (entry);
+	if (playback_uri == NULL)
+		return;
+
 	id = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_ENTRY_ID);
 	foreach_adapter_data = data;
 	record = DMAP_RECORD (rb_daap_record_new (entry));
@@ -77,6 +87,7 @@ foreach_adapter (RhythmDBEntry *entry, gpointer data)
 				    record,
 				    foreach_adapter_data->data);
 
+	g_free (playback_uri);
 	g_object_unref (record);
 }
 
