[rygel] tracker: Set title in base TrackerItem class



commit 7c83b3e34b1f027f8c841262d3a4f09fe3311032
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Nov 30 17:32:19 2009 +0200

    tracker: Set title in base TrackerItem class

 src/plugins/tracker/rygel-tracker-image-item.vala |    6 ------
 src/plugins/tracker/rygel-tracker-item.vala       |    6 ++++++
 src/plugins/tracker/rygel-tracker-music-item.vala |    6 ------
 src/plugins/tracker/rygel-tracker-video-item.vala |    6 ------
 4 files changed, 6 insertions(+), 18 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-image-item.vala b/src/plugins/tracker/rygel-tracker-image-item.vala
index a827b46..a40b363 100644
--- a/src/plugins/tracker/rygel-tracker-image-item.vala
+++ b/src/plugins/tracker/rygel-tracker-image-item.vala
@@ -37,12 +37,6 @@ public class Rygel.TrackerImageItem : Rygel.TrackerItem {
                              throws GLib.Error {
         base (id, path, parent, MediaItem.IMAGE_CLASS, metadata);
 
-        if (metadata[Metadata.TITLE] != "")
-            this.title = metadata[Metadata.TITLE];
-        else
-            /* If title wasn't provided, use filename instead */
-            this.title = metadata[Metadata.FILE_NAME];
-
         if (metadata[Metadata.WIDTH] != "")
             this.width = metadata[Metadata.WIDTH].to_int ();
 
diff --git a/src/plugins/tracker/rygel-tracker-item.vala b/src/plugins/tracker/rygel-tracker-item.vala
index 7bc2b26..93d267a 100644
--- a/src/plugins/tracker/rygel-tracker-item.vala
+++ b/src/plugins/tracker/rygel-tracker-item.vala
@@ -62,6 +62,12 @@ public abstract class Rygel.TrackerItem : Rygel.MediaItem {
 
         this.path = path;
 
+        if (metadata[Metadata.TITLE] != "")
+            this.title = metadata[Metadata.TITLE];
+        else
+            /* If title wasn't provided, use filename instead */
+            this.title = metadata[Metadata.FILE_NAME];
+
         if (metadata[Metadata.SIZE] != "")
             this.size = metadata[Metadata.SIZE].to_int ();
 
diff --git a/src/plugins/tracker/rygel-tracker-music-item.vala b/src/plugins/tracker/rygel-tracker-music-item.vala
index 681bffd..dd6b042 100644
--- a/src/plugins/tracker/rygel-tracker-music-item.vala
+++ b/src/plugins/tracker/rygel-tracker-music-item.vala
@@ -37,12 +37,6 @@ public class Rygel.TrackerMusicItem : Rygel.TrackerItem {
                              throws GLib.Error {
         base (id, path, parent, MediaItem.MUSIC_CLASS, metadata);
 
-        if (metadata[Metadata.TITLE] != "")
-            this.title = metadata[Metadata.TITLE];
-        else
-            /* If title wasn't provided, use filename instead */
-            this.title = metadata[Metadata.FILE_NAME];
-
         if (metadata[Metadata.DURATION] != "")
             this.duration = metadata[Metadata.DURATION].to_int ();
 
diff --git a/src/plugins/tracker/rygel-tracker-video-item.vala b/src/plugins/tracker/rygel-tracker-video-item.vala
index 8c777bd..c46bdfa 100644
--- a/src/plugins/tracker/rygel-tracker-video-item.vala
+++ b/src/plugins/tracker/rygel-tracker-video-item.vala
@@ -37,12 +37,6 @@ public class Rygel.TrackerVideoItem : Rygel.TrackerItem {
                              throws GLib.Error {
         base (id, path, parent, MediaItem.VIDEO_CLASS, metadata);
 
-        if (metadata[Metadata.TITLE] != "")
-            this.title = metadata[Metadata.TITLE];
-        else
-            /* If title wasn't provided, use filename instead */
-            this.title = metadata[Metadata.FILE_NAME];
-
         if (metadata[Metadata.WIDTH] != "")
             this.width = metadata[Metadata.WIDTH].to_int ();
 



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