changeset 1222:aeea3e7b0060

make fileinfo work again.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Mon, 09 Jul 2007 17:54:57 +0900
parents 619cd8c8def5
children 0ff4f43fe907
files src/madplug/fileinfo.c
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/madplug/fileinfo.c	Sun Jul 08 22:42:16 2007 -0500
+++ b/src/madplug/fileinfo.c	Mon Jul 09 17:54:57 2007 +0900
@@ -558,7 +558,7 @@
 }
 #endif                          /* !NOGUI */
 
-void audmad_get_file_info(char *filename)
+void audmad_get_file_info(char *fileurl)
 {
 #ifndef NOGUI
     gchar *title;
@@ -567,28 +567,32 @@
     static char const *const mode_str[4] = {
         ("single channel"), ("dual channel"), "joint stereo", "stereo"
     };
-    char *utf_filename;
+    gchar *tmp, *utf_filename;
 
 #ifdef DEBUG
     {
-        gchar *tmp = str_to_utf8(filename);
+        tmp = str_to_utf8(fileurl);
         g_message("f: audmad_get_file_info: %s", tmp);
         g_free(tmp);
+        tmp = NULL;
     }
 #endif
 
-    if(!g_file_test(filename, G_FILE_TEST_EXISTS)) {
+    if(!vfs_file_test(fileurl, G_FILE_TEST_EXISTS)) {
         return;
     }
 
-    input_init(&info, filename);
+    input_init(&info, fileurl);
 
-    if(audmad_is_remote(filename)) {
+    if(audmad_is_remote(fileurl)) {
         info.remote = TRUE;
         return; //file info dialog for remote streaming doesn't make sense.
     }
 
-    utf_filename = str_to_utf8(filename);
+    tmp = g_filename_from_uri(fileurl, NULL, NULL);
+    utf_filename = str_to_utf8(tmp);
+    g_free(tmp);
+    tmp = NULL;
     create_window();
 
     info.fileinfo_request = TRUE;