banshee r3115 - in trunk/banshee/src/Core/Banshee.Services: Banshee.Collection.Database Banshee.Library



Author: abock
Date: Thu Jan 31 05:42:23 2008
New Revision: 3115
URL: http://svn.gnome.org/viewvc/banshee?rev=3115&view=rev

Log:
Some minor cleanup

Modified:
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/LibraryTrackInfo.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Library/LibraryImportManager.cs

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/LibraryTrackInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/LibraryTrackInfo.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/LibraryTrackInfo.cs	Thu Jan 31 05:42:23 2008
@@ -247,11 +247,6 @@
                 check_command.ApplyValues (relative_path, uri.AbsoluteUri))) > 0;
         }
         
-        /// <summary>
-        /// Copies the file references in the current LibraryTrackInfo instance to a location
-        /// inside of the user's current library path.
-        /// </summary>
-        /// <returns>New SafeUri pointing to the newly copied file.</returns>
         public SafeUri CopyToLibrary ()
         {
             SafeUri old_uri = this.Uri;
@@ -280,8 +275,8 @@
                     
                     // Return new SafeUri after copy
                     return new_uri;
-                } catch (Exception ex) {
-                    Log.Error (String.Format("Exception copying into library: {0}", ex), false);
+                } catch (Exception e) {
+                    Log.Error (String.Format("Exception copying into library: {0}", e), false);
                     return null;
                 }
             }

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Library/LibraryImportManager.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Library/LibraryImportManager.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Library/LibraryImportManager.cs	Thu Jan 31 05:42:23 2008
@@ -105,6 +105,11 @@
                 TagLib.File file = StreamTagger.ProcessUri (uri);
                 track = new LibraryTrackInfo ();
                 StreamTagger.TrackInfoMerge (track, file);
+                
+                SafeUri newpath = track.CopyToLibrary ();
+                if (newpath != null) {
+                    track.Uri = newpath;
+                }
 
                 ThreadAssist.ProxyToMain (delegate {
                     track.DateAdded = DateTime.Now;
@@ -114,11 +119,6 @@
 
                     artist.Save ();
 
-                    SafeUri newpath = track.CopyToLibrary ();
-                    if (newpath != null) {
-                        track.Uri = newpath;
-                    }
-
                     track.Save ();
                     (ServiceManager.SourceManager.DefaultSource as LibrarySource).Reload ();
                 });



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