changeset 2165:624eb07fe591

- set FIELD_LENGTH. - id3_file_open no longer needs unescaped file name.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Tue, 13 Nov 2007 05:25:42 +0900
parents 9dec1bf7edde
children 9fa5a7884514
files src/tta/libtta.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/tta/libtta.c	Tue Nov 13 05:17:30 2007 +0900
+++ b/src/tta/libtta.c	Tue Nov 13 05:25:42 2007 +0900
@@ -581,6 +581,9 @@
 
 				if(ttainfo->ID3.comment)
 					aud_tuple_associate_string(tuple, FIELD_COMMENT, NULL, (gchar *) ttainfo->ID3.comment);
+				if(ttainfo->LENGTH)
+					aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, 1000 * ttainfo->LENGTH);
+
 			}
 			close_tta_file (ttainfo);
 		}
@@ -803,14 +806,11 @@
 int get_id3_tags (const char *filename, tta_info *ttainfo) {
 	int id3v2_size = 0;
 	gchar *str = NULL;
-	gchar *realfn = NULL;
 
 	struct id3_file *id3file = NULL;
 	struct id3_tag  *tag = NULL;
 
-	realfn = g_filename_from_uri(filename, NULL, NULL);
-	id3file = id3_file_open (realfn ? realfn : filename, ID3_FILE_MODE_READONLY);
-	g_free(realfn); realfn = NULL;
+	id3file = id3_file_open (filename, ID3_FILE_MODE_READONLY);
 
 	if (id3file) {
 		tag = id3_file_tag (id3file);