server: Return proper contentFeatures for DIDL_S
authorJens Georg <jensg@openismus.com>
Tue, 8 Oct 2013 11:13:04 +0000 (13:13 +0200)
committerJens Georg <jensg@openismus.com>
Wed, 9 Oct 2013 13:04:49 +0000 (15:04 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=709627

src/librygel-server/rygel-http-playlist-handler.vala

index e2a4e39..6a8d5aa 100644 (file)
@@ -165,7 +165,14 @@ internal class Rygel.HTTPPlaylistHandler : Rygel.HTTPGetHandler {
         var protocol = request.http_server.get_protocol ();
 
         try {
-            return request.object.add_resource (didl_object, null, protocol);
+            var res = request.object.add_resource (didl_object, null, protocol);
+
+            // set DLNA profile to get proper contentFeatures header
+            if (this.playlist_type == SerializerType.DIDL_S) {
+                res.protocol_info.dlna_profile = "DIDL_S";
+            }
+
+            return res;
         } catch (Error error) {
             return null as DIDLLiteResource;
         }