rygel r738 - trunk/src/plugins/tracker
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r738 - trunk/src/plugins/tracker
- Date: Sun, 22 Mar 2009 20:49:01 +0000 (UTC)
Author: zeeshanak
Date: Sun Mar 22 20:49:01 2009
New Revision: 738
URL: http://svn.gnome.org/viewvc/rygel?rev=738&view=rev
Log:
Export duration for music and video items from Tracker.
Patch from Henrique Ferreiro GarcÃa <henrique ferreiro gmail com>.
Modified:
trunk/src/plugins/tracker/rygel-tracker-music-item.vala
trunk/src/plugins/tracker/rygel-tracker-video-item.vala
Modified: trunk/src/plugins/tracker/rygel-tracker-music-item.vala
==============================================================================
--- trunk/src/plugins/tracker/rygel-tracker-music-item.vala (original)
+++ trunk/src/plugins/tracker/rygel-tracker-music-item.vala Sun Mar 22 20:49:01 2009
@@ -33,6 +33,7 @@
FILE_NAME,
MIME,
SIZE,
+ DURATION,
TITLE,
ARTIST,
TRACK_NUM,
@@ -55,6 +56,7 @@
keys[Metadata.FILE_NAME] = "File:Name";
keys[Metadata.MIME] = "File:Mime";
keys[Metadata.SIZE] = "File:Size";
+ keys[Metadata.DURATION] = "Audio:Duration";
keys[Metadata.TITLE] = "Audio:Title";
keys[Metadata.ARTIST] = "Audio:Artist";
keys[Metadata.TRACK_NUM] = "Audio:TrackNo";
@@ -76,6 +78,9 @@
if (values[Metadata.SIZE] != "")
this.size = values[Metadata.SIZE].to_int ();
+ if (values[Metadata.DURATION] != "")
+ this.duration = values[Metadata.DURATION].to_int ();
+
if (values[Metadata.TRACK_NUM] != "")
this.track_number = values[Metadata.TRACK_NUM].to_int ();
Modified: trunk/src/plugins/tracker/rygel-tracker-video-item.vala
==============================================================================
--- trunk/src/plugins/tracker/rygel-tracker-video-item.vala (original)
+++ trunk/src/plugins/tracker/rygel-tracker-video-item.vala Sun Mar 22 20:49:01 2009
@@ -33,6 +33,7 @@
FILE_NAME,
MIME,
SIZE,
+ DURATION,
TITLE,
AUTHOR,
WIDTH,
@@ -53,6 +54,7 @@
keys[Metadata.FILE_NAME] = "File:Name";
keys[Metadata.MIME] = "File:Mime";
keys[Metadata.SIZE] = "File:Size";
+ keys[Metadata.DURATION] = "Video:Duration";
keys[Metadata.TITLE] = "Video:Title";
keys[Metadata.AUTHOR] = "Video:Author";
keys[Metadata.WIDTH] = "Video:Width";
@@ -72,6 +74,9 @@
if (values[Metadata.SIZE] != "")
this.size = values[Metadata.SIZE].to_int ();
+ if (values[Metadata.DURATION] != "")
+ this.duration = values[Metadata.DURATION].to_int ();
+
if (values[Metadata.WIDTH] != "")
this.width = values[Metadata.WIDTH].to_int ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]