[rygel/rygel-0-20] server: Return proper contentFeatures for DIDL_S



commit 3b3eeba9130ab0bad4a9357d8f1f4ee85ccc485e
Author: Jens Georg <jensg openismus com>
Date:   Tue Oct 8 13:13:04 2013 +0200

    server: Return proper contentFeatures for DIDL_S
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709627

 .../rygel-http-playlist-handler.vala               |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/librygel-server/rygel-http-playlist-handler.vala 
b/src/librygel-server/rygel-http-playlist-handler.vala
index e2a4e39..6a8d5aa 100644
--- a/src/librygel-server/rygel-http-playlist-handler.vala
+++ b/src/librygel-server/rygel-http-playlist-handler.vala
@@ -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;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]