changeset 3870:6d0db63e05aa

file name should be un-escaped when it is used as a title in the playlist.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Tue, 30 Oct 2007 17:25:02 +0900
parents 7cfa1e7cec08
children efd2924b3f90
files src/audacious/tuple_formatter.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/tuple_formatter.c	Mon Oct 29 17:25:32 2007 +0100
+++ b/src/audacious/tuple_formatter.c	Tue Oct 30 17:25:02 2007 +0900
@@ -585,8 +585,11 @@
     rv = tuple_formatter_process_string(tuple, string);
 
     if(!rv || !strcmp(rv, "")) {
+        const gchar *file_name = tuple_get_string(tuple, FIELD_FILE_NAME, NULL);
         g_free(rv);
-        rv = g_strdup(tuple_get_string(tuple, FIELD_FILE_NAME, NULL));
+        rv = g_filename_from_uri(file_name, NULL, NULL);
+        if(!rv)
+            rv = g_strdup(file_name);
     }
 
     return rv;