server: Fix playlist transfer mode handling
authorJens Georg <jensg@openismus.com>
Sun, 16 Jun 2013 09:36:25 +0000 (11:36 +0200)
committerJens Georg <jensg@openismus.com>
Mon, 17 Jun 2013 12:43:28 +0000 (14:43 +0200)
src/librygel-server/rygel-http-get.vala
src/librygel-server/rygel-media-container.vala

index d8882fc..19422d0 100644 (file)
@@ -206,18 +206,20 @@ internal class Rygel.HTTPGet : HTTPRequest {
 
         switch (mode) {
         case "Streaming":
-            correct = this.handler is HTTPTranscodeHandler ||
+            correct = (!(this.handler is HTTPPlaylistHandler)) && (
+                      (this.handler is HTTPTranscodeHandler ||
                       ((this.object as MediaItem).streamable () &&
                        this.subtitle == null &&
-                       this.thumbnail == null);
+                       this.thumbnail == null)));
 
             break;
         case "Interactive":
-            correct = this.handler is HTTPIdentityHandler &&
+            correct = (this.handler is HTTPIdentityHandler &&
                       ((!(this.object as MediaItem).is_live_stream () &&
                        !(this.object as MediaItem).streamable ()) ||
                        (this.subtitle != null ||
-                        this.thumbnail != null));
+                        this.thumbnail != null))) ||
+                      this.handler is HTTPPlaylistHandler;
 
             break;
         }
index 4ae62e1..efb2b70 100644 (file)
@@ -371,7 +371,8 @@ public abstract class Rygel.MediaContainer : MediaObject {
         protocol_info.protocol = protocol;
         protocol_info.dlna_flags = DLNAFlags.DLNA_V15 |
                                    DLNAFlags.CONNECTION_STALL |
-                                   DLNAFlags.BACKGROUND_TRANSFER_MODE;
+                                   DLNAFlags.BACKGROUND_TRANSFER_MODE |
+                                   DLNAFlags.INTERACTIVE_TRANSFER_MODE;
         res.protocol_info = protocol_info;
 
         return res;