[banshee] Dap.MassStorage: decode URI before using it as playlist name



commit 64a7f06ce34e8a3486f7d37944fa317eba9666f3
Author: William Witt <william witt-family net>
Date:   Tue Aug 30 18:11:23 2011 +0100

    Dap.MassStorage: decode URI before using it as playlist name
    
    Playlists are pulled from the filename in the uri, failure to
    decode them causes playlists to be saved back with URL encoding,
    so spaces or other characters where shown as weird characters in
    the UI. Fixes bgo#647917.

 .../Banshee.Dap.MassStorage/MassStorageSource.cs   |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
index 3be5b9e..880dbf1 100644
--- a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
+++ b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
@@ -170,7 +170,8 @@ namespace Banshee.Dap.MassStorage
                     if (loaded_playlist == null)
                         continue;
 
-                    PlaylistSource playlist = new PlaylistSource (System.IO.Path.GetFileNameWithoutExtension (playlist_path), this);
+                    string name = System.IO.Path.GetFileNameWithoutExtension (SafeUri.UriToFilename (playlist_path));
+                    PlaylistSource playlist = new PlaylistSource (name, this);
                     playlist.Save ();
                     //Hyena.Data.Sqlite.HyenaSqliteCommand.LogAll = true;
                     foreach (Dictionary<string, object> element in loaded_playlist.Elements) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]