[rygel] media-export: Set own class for DVD tracks



commit e0329e63a3fffea8f2abc767ef4ed2385ef77e02
Author: Jens Georg <mail jensge org>
Date:   Sun May 15 22:44:19 2016 +0200

    media-export: Set own class for DVD tracks
    
    Signed-off-by: Jens Georg <mail jensge org>

 .../rygel-media-export-dvd-parser.vala             |    4 +++-
 .../media-export/rygel-media-export-dvd-track.vala |    2 ++
 .../media-export/rygel-media-export-extract.vala   |    1 +
 3 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-dvd-parser.vala 
b/src/plugins/media-export/rygel-media-export-dvd-parser.vala
index a455377..4a02362 100644
--- a/src/plugins/media-export/rygel-media-export-dvd-parser.vala
+++ b/src/plugins/media-export/rygel-media-export-dvd-parser.vala
@@ -78,7 +78,9 @@ internal class Rygel.MediaExport.DVDParser : Extractor {
         if ((xpo != null) &&
             (xpo->type == Xml.XPath.ObjectType.NODESET) &&
             (xpo->nodesetval->length () == 1)) {
-            this.serialized_info.insert ("UPnPClass", "s", UPNP_CLASS_VIDEO);
+            this.serialized_info.insert ("UPnPClass",
+                                         "s",
+                                         UPNP_CLASS_DVD_TRACK);
             this.serialized_info.insert ("MimeType", "s", "video/mpeg");
 
             var node = xpo->nodesetval->item (0);
diff --git a/src/plugins/media-export/rygel-media-export-dvd-track.vala 
b/src/plugins/media-export/rygel-media-export-dvd-track.vala
index f6ba538..a23267e 100644
--- a/src/plugins/media-export/rygel-media-export-dvd-track.vala
+++ b/src/plugins/media-export/rygel-media-export-dvd-track.vala
@@ -23,6 +23,8 @@
 using GUPnP;
 
 internal class Rygel.MediaExport.DVDTrack : VideoItem {
+    public new const string UPNP_CLASS = Rygel.VideoItem.UPNP_CLASS + ".dvdTrack";
+
     public Xml.Node* node { private get; construct set; }
     public int track { private get; construct set; }
 
diff --git a/src/plugins/media-export/rygel-media-export-extract.vala 
b/src/plugins/media-export/rygel-media-export-extract.vala
index d561dde..1929800 100644
--- a/src/plugins/media-export/rygel-media-export-extract.vala
+++ b/src/plugins/media-export/rygel-media-export-extract.vala
@@ -32,6 +32,7 @@ const string UPNP_CLASS_VIDEO = "object.item.videoItem";
 const string UPNP_CLASS_PLAYLIST = "object.item.playlistItem";
 const string UPNP_CLASS_PLAYLIST_CONTAINER_DVD =
                                       "object.container.playlistContainer.DVD";
+const string UPNP_CLASS_DVD_TRACK = UPNP_CLASS_VIDEO + ".dvdTrack";
 
 const string STATUS_LINE_TEMPLATE = "RESULT|%s|%" + size_t.FORMAT + "|%s\n";
 const string ERROR_LINE_TEMPLATE = "ERROR|%s|%d|%s\n";


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