tracker: Minor refactoring
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 18 Sep 2009 13:21:39 +0000 (16:21 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sat, 19 Sep 2009 16:50:16 +0000 (19:50 +0300)
src/plugins/tracker/rygel-tracker-search-container.vala

index 2896c29..42a9506 100644 (file)
@@ -209,18 +209,20 @@ public abstract class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
     public MediaItem? create_item (string   service,
                                    string   path,
                                    string[] metadata) {
+        var id = this.id + ":" + path;
+
         if (service == TrackerVideoItem.SERVICE) {
-            return new TrackerVideoItem (this.id + ":" + path,
+            return new TrackerVideoItem (id,
                                          path,
                                          this,
                                          metadata);
         } else if (service == TrackerImageItem.SERVICE) {
-            return new TrackerImageItem (this.id + ":" + path,
+            return new TrackerImageItem (id,
                                          path,
                                          this,
                                          metadata);
         } else if (service == TrackerMusicItem.SERVICE) {
-            return new TrackerMusicItem (this.id + ":" + path,
+            return new TrackerMusicItem (id,
                                          path,
                                          this,
                                          metadata);