No need to keep the keys in the TrackerItem class.
authorZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Thu, 25 Dec 2008 11:59:37 +0000 (11:59 +0000)
committerZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Thu, 25 Dec 2008 11:59:37 +0000 (11:59 +0000)
svn path=/trunk/; revision=367

src/plugins/tracker/rygel-tracker-image-item.vala
src/plugins/tracker/rygel-tracker-item.vala
src/plugins/tracker/rygel-tracker-music-item.vala
src/plugins/tracker/rygel-tracker-video-item.vala

index dacbf21..7337f83 100644 (file)
@@ -34,20 +34,19 @@ public class Rygel.TrackerImageItem : TrackerItem {
     public TrackerImageItem (string              id,
                              string              path,
                              TrackerContainer    parent) throws GLib.Error {
-        keys = new string[] {"File:Name",
-                             "File:Mime",
-                             "Image:Title",
-                             "Image:Creator",
-                             "Image:Width",
-                             "Image:Height",
-                             "Image:Album",
-                             "Image:Date",
-                             "DC:Date"};
-
         base (id, path, parent);
     }
 
     public override void fetch_metadata () throws GLib.Error {
+        string[] keys = new string[] {"File:Name",
+                                      "File:Mime",
+                                      "Image:Title",
+                                      "Image:Creator",
+                                      "Image:Width",
+                                      "Image:Height",
+                                      "Image:Album",
+                                      "Image:Date",
+                                      "DC:Date"};
         string[] values = null;
 
         /* TODO: make this async */
index 6f637fc..2e6c855 100644 (file)
@@ -34,8 +34,6 @@ public abstract class Rygel.TrackerItem : MediaItem {
     protected TrackerContainer parent;
     protected string path;
 
-    protected string[] keys;
-
     public TrackerItem (string           id,
                         string           path,
                         TrackerContainer parent) throws GLib.Error {
index 4d5fe1c..ed29715 100644 (file)
@@ -34,20 +34,19 @@ public class Rygel.TrackerMusicItem : TrackerItem {
     public TrackerMusicItem (string              id,
                              string              path,
                              TrackerContainer    parent) throws GLib.Error {
-        keys = new string[] {"File:Name",
-                             "File:Mime",
-                             "Audio:Title",
-                             "Audio:Artist",
-                             "Audio:TrackNo",
-                             "Audio:Album",
-                             "Audio:ReleaseDate",
-                             "Audio:DateAdded",
-                             "DC:Date"};
-
         base (id, path, parent);
     }
 
     public override void fetch_metadata () throws GLib.Error {
+        string[] keys = new string[] {"File:Name",
+                                      "File:Mime",
+                                      "Audio:Title",
+                                      "Audio:Artist",
+                                      "Audio:TrackNo",
+                                      "Audio:Album",
+                                      "Audio:ReleaseDate",
+                                      "Audio:DateAdded",
+                                      "DC:Date"};
         string[] values = null;
 
         /* TODO: make this async */
index 90c1304..5bcb24f 100644 (file)
@@ -34,18 +34,17 @@ public class Rygel.TrackerVideoItem : TrackerItem {
     public TrackerVideoItem (string              id,
                              string              path,
                              TrackerContainer    parent) throws GLib.Error {
-        keys = new string[] {"File:Name",
-                             "File:Mime",
-                             "Video:Title",
-                             "Video:Author",
-                             "Video:Width",
-                             "Video:Height",
-                             "DC:Date"};
-
         base (id, path, parent);
     }
 
     public override void fetch_metadata () throws GLib.Error {
+        string[] keys = new string[] {"File:Name",
+                                      "File:Mime",
+                                      "Video:Title",
+                                      "Video:Author",
+                                      "Video:Width",
+                                      "Video:Height",
+                                      "DC:Date"};
         string[] values = null;
 
         /* TODO: make this async */