# HG changeset patch # User Yoshiki Yazawa # Date 1195367062 -32400 # Node ID 02cfac0efbdc1fd54aad6c20c9ece84c8869504d # Parent 838098201ac97f90eb359735a76e9bf36420da1f remove unnecessary code. (I can't recall why I used "uri", actually.) diff -r 838098201ac9 -r 02cfac0efbdc src/xspf/xspf.c --- a/src/xspf/xspf.c Sat Nov 17 19:02:51 2007 -0600 +++ b/src/xspf/xspf.c Sun Nov 18 15:24:22 2007 +0900 @@ -80,7 +80,6 @@ /* we need encoding conversion */ #ifdef DEBUG -//# define XSDEBUG(...) { fprintf(stderr, "xspf[%s:%d]: ", __FUNCTION__, (int) __LINE__); fprintf(stderr, __VA_ARGS__); } # define XSDEBUG(...) { g_print("xspf[%s:%d]: ", __FUNCTION__, (int) __LINE__); g_print(__VA_ARGS__); } #else # define XSDEBUG(...) /* stub */ @@ -187,19 +186,12 @@ } if (location) { - gchar *uri = NULL, *realfn = NULL, *scratch = NULL; + gchar *realfn = NULL, *scratch = NULL; /* filename and path in tuple must be unescaped. */ scratch = g_filename_from_uri(location, NULL, NULL); - - if (scratch != NULL) { - realfn = aud_str_to_utf8(scratch ? scratch : location); - uri = aud_str_to_utf8(scratch ? location : scratch); - g_free(scratch); - } else { - realfn = g_strdup(location); - uri = g_strdup(location); - } + realfn = aud_str_to_utf8(scratch ? scratch : location); + g_free(scratch); scratch = g_path_get_basename(realfn); aud_tuple_associate_string(tuple, FIELD_FILE_NAME, NULL, scratch); @@ -215,8 +207,8 @@ XSDEBUG("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, uri, filename, pos, tuple); - g_free(realfn); g_free(uri); + aud_playlist_load_ins_file_tuple(playlist, location, filename, pos, tuple); + g_free(realfn); pos++; }