# HG changeset patch # User Yoshiki Yazawa # Date 1197912780 -32400 # Node ID 58b89671b395c5fec369c9d1628a36f5283a4999 # Parent e8de4c4a3cacfe0af94200750a4322e3579d05c3 make use of aud_uri_to_display_*() diff -r e8de4c4a3cac -r 58b89671b395 src/xspf/xspf.c --- a/src/xspf/xspf.c Mon Dec 17 22:05:31 2007 +0900 +++ b/src/xspf/xspf.c Tue Dec 18 02:33:00 2007 +0900 @@ -183,29 +183,24 @@ } if (location) { - gchar *realfn = NULL, *scratch = NULL; + gchar *scratch = NULL; /* filename and path in tuple must be unescaped. */ - scratch = g_filename_from_uri(location, NULL, NULL); - realfn = aud_str_to_utf8(scratch ? scratch : location); - g_free(scratch); - - scratch = g_path_get_basename(realfn); + scratch = aud_uri_to_display_basename(location); aud_tuple_associate_string(tuple, FIELD_FILE_NAME, NULL, scratch); g_free(scratch); - scratch = g_path_get_dirname(realfn); + scratch = aud_uri_to_display_dirname(location); aud_tuple_associate_string(tuple, FIELD_FILE_PATH, NULL, scratch); g_free(scratch); - aud_tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, strrchr(realfn, '.')); + aud_tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, strrchr(location, '.')); AUDDBG("tuple->file_name = %s\n", aud_tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); AUDDBG("tuple->file_path = %s\n", aud_tuple_get_string(tuple, FIELD_FILE_PATH, NULL)); /* add file to playlist */ aud_playlist_load_ins_file_tuple(playlist, location, filename, pos, tuple); - g_free(realfn); pos++; }