changeset 3097:bb1fa0aed8f4

add url unescape code to playlist_get_info_text().
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Thu, 19 Jul 2007 12:49:50 +0900
parents 8e4da6a4ab91
children 4f011bf1d083
files src/audacious/playlist.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playlist.c	Wed Jul 18 21:42:58 2007 +0900
+++ b/src/audacious/playlist.c	Thu Jul 19 12:49:50 2007 +0900
@@ -1501,9 +1501,13 @@
         title = str_to_utf8(playlist->position->title);
     }
     else {
-        gchar *basename = g_path_get_basename(playlist->position->filename);
+        gchar *realfn = NULL;
+        gchar *basename = NULL;
+        realfn = g_filename_from_uri(playlist->position->filename, NULL, NULL);
+        basename = g_path_get_basename(realfn ? realfn : playlist->position->filename);
         title = filename_to_utf8(basename);
-        g_free(basename);
+        g_free(realfn); realfn = NULL;
+        g_free(basename); basename = NULL;
     }
 
     /*