changeset 2170:02cfac0efbdc

remove unnecessary code. (I can't recall why I used "uri", actually.)
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sun, 18 Nov 2007 15:24:22 +0900
parents 838098201ac9
children a4387938cc7d 2c6a11b88271
files src/xspf/xspf.c
diffstat 1 files changed, 5 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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++;
     }