Mercurial > audlegacy-plugins
changeset 2242:e8de4c4a3cac
branch merge
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Mon, 17 Dec 2007 22:05:31 +0900 |
parents | a5c96af75300 (diff) 31e6845e722a (current diff) |
children | 58b89671b395 |
files | |
diffstat | 1 files changed, 7 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/madplug/plugin.c Mon Dec 17 18:40:07 2007 +0900 +++ b/src/madplug/plugin.c Mon Dec 17 22:05:31 2007 +0900 @@ -610,7 +610,6 @@ { Tuple *tuple = NULL; gchar *string = NULL; - gchar *realfn = NULL; struct id3_file *id3file = NULL; struct id3_tag *tag = NULL; @@ -709,11 +708,10 @@ g_free(string); string = NULL; } - realfn = g_filename_from_uri(filename, NULL, NULL); - __set_and_free(tuple, FIELD_FILE_NAME, NULL, g_path_get_basename(realfn ? realfn : filename)); - __set_and_free(tuple, FIELD_FILE_PATH, NULL, g_path_get_dirname(realfn ? realfn : filename)); - aud_tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, extname(realfn ? realfn : filename)); - g_free(realfn); realfn = NULL; + + __set_and_free(tuple, FIELD_FILE_NAME, NULL, aud_uri_to_display_basename(filename)); + __set_and_free(tuple, FIELD_FILE_PATH, NULL, aud_uri_to_display_dirname(filename)); + aud_tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, extname(filename)); // length length = mad_timer_count(myinfo.duration, MAD_UNITS_MILLISECONDS); @@ -734,11 +732,9 @@ id3_file_close(id3file); } // id3file else { // no id3tag - realfn = g_filename_from_uri(filename, NULL, NULL); - __set_and_free(tuple, FIELD_FILE_NAME, NULL, g_path_get_basename(realfn ? realfn : filename)); - __set_and_free(tuple, FIELD_FILE_PATH, NULL, g_path_get_dirname(realfn ? realfn : filename)); - aud_tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, extname(realfn ? realfn : filename)); - g_free(realfn); realfn = NULL; + __set_and_free(tuple, FIELD_FILE_NAME, NULL, aud_uri_to_display_basename(filename)); + __set_and_free(tuple, FIELD_FILE_PATH, NULL, aud_uri_to_display_dirname(filename)); + aud_tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, extname(filename)); // length length = mad_timer_count(myinfo.duration, MAD_UNITS_MILLISECONDS); aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, length);