changeset 2420:5aa8588d657a

make load list button work for pls. closes #181.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sat, 23 Feb 2008 21:08:27 +0900
parents 944a510f5200
children 6c272f46fa99
files src/pls/pls.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/pls/pls.c	Sat Feb 23 15:13:52 2008 +0900
+++ b/src/pls/pls.c	Sat Feb 23 21:08:27 2008 +0900
@@ -47,13 +47,18 @@
     gchar line_key[10], title_key[10];
     gchar *line, *title;
     Playlist *playlist = aud_playlist_get_active();
+    gchar *uri = NULL;
 
     g_return_if_fail(filename != NULL);
 
     if (!aud_str_has_suffix_nocase(filename, ".pls"))
         return;
 
-    INIFile *inifile = aud_open_ini_file(filename);
+    uri = g_filename_to_uri(filename, NULL, NULL);
+
+    INIFile *inifile = aud_open_ini_file(uri ? uri : filename);
+    g_free(uri); uri = NULL;
+
     if (!(line = aud_read_ini_string(inifile, "playlist", "NumberOfEntries")))
     {
         aud_close_ini_file(inifile);