[banshee] RescanPipeline: Reuse existing SafeUri instance when importing



commit 8e1524b8a6232fce8b42435ae426718ce3434d0f
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sun Oct 9 13:30:09 2011 +0200

    RescanPipeline: Reuse existing SafeUri instance when importing
    
    If we pass the file path a string to the ImportManager, it will create a
    SafeUri from it. So we just reuse the SafeUri we already have, to avoid
    unnecessary allocations.

 .../Banshee.Collection/RescanPipeline.cs           |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Collection/RescanPipeline.cs b/src/Core/Banshee.Services/Banshee.Collection/RescanPipeline.cs
index 034e377..572f830 100644
--- a/src/Core/Banshee.Services/Banshee.Collection/RescanPipeline.cs
+++ b/src/Core/Banshee.Services/Banshee.Collection/RescanPipeline.cs
@@ -196,7 +196,7 @@ namespace Banshee.Collection
                             if (similar_track == null) {
                                 //Hyena.Log.DebugFormat ("Couldn't find it, so queueing to import it");
                                 status = System.IO.Path.GetFileNameWithoutExtension (file_path);
-                                ServiceManager.Get<Banshee.Library.LibraryImportManager> ().ImportTrack (file_path);
+                                ServiceManager.Get<Banshee.Library.LibraryImportManager> ().ImportTrack (uri);
                             }
                         }
                     }



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