rygel r579 - trunk/src/plugins/tracker



Author: zeeshanak
Date: Sat Feb 14 15:26:14 2009
New Revision: 579
URL: http://svn.gnome.org/viewvc/rygel?rev=579&view=rev

Log:
Remove TrackerContainer.fetch_item method.

Modified:
   trunk/src/plugins/tracker/rygel-tracker-container.vala

Modified: trunk/src/plugins/tracker/rygel-tracker-container.vala
==============================================================================
--- trunk/src/plugins/tracker/rygel-tracker-container.vala	(original)
+++ trunk/src/plugins/tracker/rygel-tracker-container.vala	Sat Feb 14 15:26:14 2009
@@ -168,8 +168,19 @@
                                       AsyncReadyCallback callback) {
         var res = new Rygel.SimpleAsyncResult<MediaObject> (this, callback);
 
+        string path = this.get_item_path (id);
+        if (path == null) {
+            res.error = new ContentDirectoryError.NO_SUCH_OBJECT (
+                                                    "No such object");
+            res.complete_in_idle ();
+            return;
+        }
+
         try {
-            res.data = this.fetch_item (id);
+            string[] keys = this.get_metadata_keys ();
+            string[] metadata = this.metadata.Get (this.category, path, keys);
+
+            res.data = this.fetch_item_by_path (path, metadata);
         } catch (GLib.Error error) {
             res.error = error;
         }
@@ -218,19 +229,6 @@
         }
     }
 
-    private MediaItem? fetch_item (string id) throws GLib.Error {
-        string path = this.get_item_path (id);
-
-        if (path == null) {
-            return null;
-        }
-
-        string[] keys = this.get_metadata_keys ();
-        string[] metadata = this.metadata.Get (this.category, path, keys);
-
-        return this.fetch_item_by_path (path, metadata);
-    }
-
     /**
      * Chops the tail of a string array.
      *



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