[rygel/rygel-0-16] tracker: Drop GUPnP-DLNA dependency



commit f50f9caa8b5dbb8af01222abe110eb8e1b398b36
Author: Jens Georg <jensg openismus com>
Date:   Fri Sep 28 10:46:18 2012 +0200

    tracker: Drop GUPnP-DLNA dependency
    
    If tracker knows the DLNA profile for a file, it also knows the correct mime
    type with version >= 0.12. We can drop this dependency now.

 src/plugins/tracker/Makefile.am                    |   10 +++++-----
 .../tracker/rygel-tracker-item-factory.vala        |   14 +-------------
 2 files changed, 6 insertions(+), 18 deletions(-)
---
diff --git a/src/plugins/tracker/Makefile.am b/src/plugins/tracker/Makefile.am
index e031fb8..8ea4e50 100644
--- a/src/plugins/tracker/Makefile.am
+++ b/src/plugins/tracker/Makefile.am
@@ -1,9 +1,8 @@
-include ../../../common.am
+include $(top_srcdir)/common.am
 
 plugin_LTLIBRARIES = librygel-tracker.la
 
 AM_CFLAGS += -DG_LOG_DOMAIN='"Rygel-Tracker"' \
-    $(LIBGUPNP_DLNA_CFLAGS) \
     $(TRACKER_SPARQL_CFLAGS)
 
 librygel_tracker_la_SOURCES = \
@@ -40,10 +39,11 @@ librygel_tracker_la_SOURCES = \
 	rygel-tracker-plugin-factory.vala \
 	rygel-tracker-interfaces.vala
 
-librygel_tracker_la_VALAFLAGS = --pkg posix \
-	--pkg gupnp-dlna-1.0 \
+librygel_tracker_la_VALAFLAGS = \
+	--pkg posix \
 	--pkg tracker-sparql-0.14 \
 	$(RYGEL_COMMON_SERVER_PLUGIN_VALAFLAGS)
-librygel_tracker_la_LIBADD = $(RYGEL_COMMON_SERVER_LIBS) $(LIBGUPNP_DLNA_LIBS) \
+librygel_tracker_la_LIBADD = \
+	$(RYGEL_COMMON_SERVER_LIBS) \
 	$(TRACKER_SPARQL_LIBS)
 librygel_tracker_la_LDFLAGS = $(RYGEL_PLUGIN_LINKER_FLAGS)
diff --git a/src/plugins/tracker/rygel-tracker-item-factory.vala b/src/plugins/tracker/rygel-tracker-item-factory.vala
index 630642b..a91ca6f 100644
--- a/src/plugins/tracker/rygel-tracker-item-factory.vala
+++ b/src/plugins/tracker/rygel-tracker-item-factory.vala
@@ -54,8 +54,6 @@ public abstract class Rygel.Tracker.ItemFactory {
 
     public ArrayList<string> properties;
 
-    private DLNADiscoverer discoverer;
-
     public ItemFactory (string  category,
                         string  category_iri,
                         string  upnp_class,
@@ -69,10 +67,6 @@ public abstract class Rygel.Tracker.ItemFactory {
                  upload_dir == null ? "none" : upload_dir,
                  upnp_class);
 
-        // FIXME: In order to work around bug#647575, we take mime-type from
-        //        gupnp-dlna rather than Tracker.
-        this.discoverer = new DLNADiscoverer ((ClockTime) SECOND, true, true);
-
         this.properties = new ArrayList<string> ();
 
         // These must be the same order as enum Metadata
@@ -131,17 +125,11 @@ public abstract class Rygel.Tracker.ItemFactory {
             item.date = metadata.get_string (Metadata.DATE);
         }
 
-        var profile = null as DLNAProfile;
         if (metadata.is_bound (Metadata.DLNA_PROFILE)) {
             item.dlna_profile = metadata.get_string (Metadata.DLNA_PROFILE);
-            profile = this.discoverer.get_profile (item.dlna_profile);
         }
 
-        if (profile != null) {
-            item.mime_type = profile.mime;
-        } else {
-            item.mime_type = metadata.get_string (Metadata.MIME);
-        }
+        item.mime_type = metadata.get_string (Metadata.MIME);
 
         item.add_uri (uri);
     }



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