[tracker/tracker-0.6] Fix playlist duration handling



commit 74e3c208a5fd3763f49961169b531752d2b16087
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 3ec6792..22a276b 100644
--- a/src/tracker-extract/tracker-extract-playlist.c
+++ b/src/tracker-extract/tracker-extract-playlist.c
@@ -43,8 +43,8 @@
 #define PLAYLIST_DEFAULT_DURATION 0 
 
 typedef struct {
-	gint        track_counter;
-	gint        total_time;
+	guint        track_counter;
+	gint64      total_time;
 } PlaylistMetadata;
 
 static void extract_playlist (const gchar *filename,
@@ -80,7 +80,7 @@ entry_parsed (TotemPlParser *parser, const gchar *uri, GHashTable *metadata, gpo
 	}
 
 	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]