banshee r4285 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Collection.Database src/Core/Banshee.Services/Banshee.Sources



Author: blorentz
Date: Tue Jul 29 16:56:08 2008
New Revision: 4285
URL: http://svn.gnome.org/viewvc/banshee?rev=4285&view=rev

Log:
2008-07-29  Bertrand Lorentz  <bertrand lorentz gmail com>

	* src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumInfo.cs:
	* src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistInfo.cs:
	* src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs: Reset the
	fields about the last artist and last album imported when the artists 
	and albums are pruned from the DB.



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumInfo.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistInfo.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumInfo.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumInfo.cs	Tue Jul 29 16:56:08 2008
@@ -64,6 +64,13 @@
         private static int last_artist_id;
         private static string last_title;
         private static DatabaseAlbumInfo last_album;
+        
+        public static void Reset ()
+        {
+            last_artist_id = -1;
+            last_title = null;
+            last_album = null;
+        }
 
         public static DatabaseAlbumInfo FindOrCreate (DatabaseArtistInfo artist, string title)
         {

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistInfo.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistInfo.cs	Tue Jul 29 16:56:08 2008
@@ -63,6 +63,12 @@
         private static string last_artist_name = null;
         private static DatabaseArtistInfo last_artist = null;
 
+        public static void Reset ()
+        {
+            last_artist_name = null;
+            last_artist = null;
+        }
+        
         public static DatabaseArtistInfo FindOrCreate (string artistName)
         {
             DatabaseArtistInfo artist = new DatabaseArtistInfo ();

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/PrimarySource.cs	Tue Jul 29 16:56:08 2008
@@ -643,6 +643,8 @@
         {
             ServiceManager.DbConnection.Execute (prune_artists_albums_command);
             base.PruneArtistsAlbums ();
+            DatabaseAlbumInfo.Reset ();
+            DatabaseArtistInfo.Reset ();
         }
     }
 }



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