[tracker] Fix playlist duration handling
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker] Fix playlist duration handling
- Date: Thu, 28 May 2009 10:20:15 -0400 (EDT)
commit 84596663eb1a86b32885410552b9dca36787752f
Author: Ivan Frade <ivan frade nokia com>
Date: Tue May 26 14:35:03 2009 +0300
Fix playlist duration handling
The duration returned after parsing the playlist is just the string in the
file. Using totem_pl_parser_parse_duration we get the value in seconds.
---
src/tracker-extract/tracker-extract-playlist.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/tracker-extract/tracker-extract-playlist.c b/src/tracker-extract/tracker-extract-playlist.c
index 38e25d9..1dc3156 100644
--- a/src/tracker-extract/tracker-extract-playlist.c
+++ b/src/tracker-extract/tracker-extract-playlist.c
@@ -51,8 +51,8 @@
#define RDF_TYPE RDF_PREFIX "type"
typedef struct {
- gint track_counter;
- gint total_time;
+ guint track_counter;
+ gint64 total_time;
GPtrArray *metadata;
const gchar *uri;
} PlaylistMetadata;
@@ -94,7 +94,7 @@ entry_parsed (TotemPlParser *parser, const gchar *to_uri, GHashTable *to_metadat
}
if (duration != NULL) {
- gint secs = atoi (duration);
+ gint64 secs = totem_pl_parser_parse_duration (duration, FALSE);
if (secs > 0) {
data->total_time += secs;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]