Switch to side-by-side view

--- a/src/httpfs.cxx
+++ b/src/httpfs.cxx
@@ -86,54 +86,57 @@
     "  <eventSubURL>/evt/OHInfo</eventSubURL>"
     "</service>"
     "<service>"
+    "  <serviceType>urn:av-openhome-org:service:Time:1</serviceType>"
+    "  <serviceId>urn:av-openhome-org:serviceId:Time</serviceId>"
+    "  <SCPDURL>/upmpd/OHTime.xml</SCPDURL>"
+    "  <controlURL>/ctl/OHTime</controlURL>"
+    "  <eventSubURL>/evt/OHTime</eventSubURL>"
+    "</service>"
+    "<service>"
+    "  <serviceType>urn:av-openhome-org:service:Volume:1</serviceType>"
+    "  <serviceId>urn:av-openhome-org:serviceId:Volume</serviceId>"
+    "  <SCPDURL>/upmpd/OHVolume.xml</SCPDURL>"
+    "  <controlURL>/ctl/OHVolume</controlURL>"
+    "  <eventSubURL>/evt/OHVolume</eventSubURL>"
+    "</service>"
+    "<service>"
+    "  <serviceType>urn:av-openhome-org:service:Playlist:1</serviceType>"
+    "  <serviceId>urn:av-openhome-org:serviceId:Playlist</serviceId>"
+    "  <SCPDURL>/upmpd/OHPlaylist.xml</SCPDURL>"
+    "  <controlURL>/ctl/OHPlaylist</controlURL>"
+    "  <eventSubURL>/evt/OHPlaylist</eventSubURL>"
+    "</service>"
+    "<service>"
+    "  <serviceType>urn:av-openhome-org:service:Radio:1</serviceType>"
+    "  <serviceId>urn:av-openhome-org:serviceId:Radio</serviceId>"
+    "  <SCPDURL>/upmpd/OHRadio.xml</SCPDURL>"
+    "  <controlURL>/ctl/OHRadio</controlURL>"
+    "  <eventSubURL>/evt/OHRadio</eventSubURL>"
+    "</service>"
+    );
+
+// We only advertise the Openhome Receiver service if the sc2mpd
+// songcast-to-mpd gateway command is available
+static string ohDescReceive(
+    "<service>"
+    "  <serviceType>urn:av-openhome-org:service:Receiver:1</serviceType>"
+    "  <serviceId>urn:av-openhome-org:serviceId:Receiver</serviceId>"
+    "  <SCPDURL>/upmpd/OHReceiver.xml</SCPDURL>"
+    "  <controlURL>/ctl/OHReceiver</controlURL>"
+    "  <eventSubURL>/evt/OHReceiver</eventSubURL>"
+    "</service>"
+    );
+// We want to be able to hide the credentials service because it
+// breaks Lumin for some reason.
+static string ohDescCreds(
+    "<service>"
     "  <serviceType>urn:av-openhome-org:service:Credentials:1</serviceType>"
     "  <serviceId>urn:av-openhome-org:serviceId:Credentials</serviceId>"
     "  <SCPDURL>/upmpd/OHCredentials.xml</SCPDURL>"
     "  <controlURL>/ctl/OHCredentials</controlURL>"
     "  <eventSubURL>/evt/OHCredentials</eventSubURL>"
     "</service>"
-    "<service>"
-    "  <serviceType>urn:av-openhome-org:service:Time:1</serviceType>"
-    "  <serviceId>urn:av-openhome-org:serviceId:Time</serviceId>"
-    "  <SCPDURL>/upmpd/OHTime.xml</SCPDURL>"
-    "  <controlURL>/ctl/OHTime</controlURL>"
-    "  <eventSubURL>/evt/OHTime</eventSubURL>"
-    "</service>"
-    "<service>"
-    "  <serviceType>urn:av-openhome-org:service:Volume:1</serviceType>"
-    "  <serviceId>urn:av-openhome-org:serviceId:Volume</serviceId>"
-    "  <SCPDURL>/upmpd/OHVolume.xml</SCPDURL>"
-    "  <controlURL>/ctl/OHVolume</controlURL>"
-    "  <eventSubURL>/evt/OHVolume</eventSubURL>"
-    "</service>"
-    "<service>"
-    "  <serviceType>urn:av-openhome-org:service:Playlist:1</serviceType>"
-    "  <serviceId>urn:av-openhome-org:serviceId:Playlist</serviceId>"
-    "  <SCPDURL>/upmpd/OHPlaylist.xml</SCPDURL>"
-    "  <controlURL>/ctl/OHPlaylist</controlURL>"
-    "  <eventSubURL>/evt/OHPlaylist</eventSubURL>"
-    "</service>"
-    "<service>"
-    "  <serviceType>urn:av-openhome-org:service:Radio:1</serviceType>"
-    "  <serviceId>urn:av-openhome-org:serviceId:Radio</serviceId>"
-    "  <SCPDURL>/upmpd/OHRadio.xml</SCPDURL>"
-    "  <controlURL>/ctl/OHRadio</controlURL>"
-    "  <eventSubURL>/evt/OHRadio</eventSubURL>"
-    "</service>"
-    );
-
-// We only advertise the Openhome Receiver service if the sc2mpd
-// songcast-to-mpd gateway command is available
-static string ohDescReceive(
-    "<service>"
-    "  <serviceType>urn:av-openhome-org:service:Receiver:1</serviceType>"
-    "  <serviceId>urn:av-openhome-org:serviceId:Receiver</serviceId>"
-    "  <SCPDURL>/upmpd/OHReceiver.xml</SCPDURL>"
-    "  <controlURL>/ctl/OHReceiver</controlURL>"
-    "  <eventSubURL>/evt/OHReceiver</eventSubURL>"
-    "</service>"
-    );
-
+    );
 static const string iconDesc(
     "<iconList>"
     "  <icon>"
@@ -299,7 +302,15 @@
                 if (enableReceiver) {
                     ohDesc += ohDescReceive;
                 }
+                bool lumincompat = configBool(g_config, "lumincompat");
+                if (!lumincompat) {
+                    ohDesc += ohDescCreds;
+                }
                 data = regsub1("@OPENHOME@", data, ohDesc);
+                // See comment about ohproduct version in upmpd.cxx
+                if (lumincompat) {
+                    data = regsub1("Product:2", data, "Product:1");
+                }
             } else {
                 data = regsub1("@OPENHOME@", data, "");
             }