[rygel] mediathek: Fix plugin



commit 593576d5d711324887e4b587b61e39af1b98fdaf
Author: Jens Georg <mail jensge org>
Date:   Fri Sep 11 10:40:58 2015 +0200

    mediathek: Fix plugin
    
    Signed-off-by: Jens Georg <mail jensge org>

 .../rygel-mediathek-video-item-factory.vala        |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/mediathek/rygel-mediathek-video-item-factory.vala 
b/src/plugins/mediathek/rygel-mediathek-video-item-factory.vala
index 5ed8ecd..02aadcf 100644
--- a/src/plugins/mediathek/rygel-mediathek-video-item-factory.vala
+++ b/src/plugins/mediathek/rygel-mediathek-video-item-factory.vala
@@ -80,6 +80,21 @@ internal class Rygel.Mediathek.VideoItemFactory : Object {
             item.add_uri (uri);
         }
 
+        // Call the MediaEngine to determine which item representations it can support
+        var media_engine = MediaEngine.get_default ( );
+        media_engine.get_resources_for_item.begin ( item,
+                                                    (obj, res) => {
+            var added_resources = media_engine
+                                  .get_resources_for_item.end (res);
+            debug ("Adding %d resources to item source %s",
+                   added_resources.size, item.get_primary_uri ());
+            foreach (var resrc in added_resources) {
+               debug ("Media-export item media resource %s",
+                      resrc.get_name ());
+            }
+            item.get_resource_list ().add_all (added_resources);
+          });
+
         return item;
     }
 


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