f-spot r4186 - trunk/src



Author: sdelcroix
Date: Wed Jul 16 13:25:10 2008
New Revision: 4186
URL: http://svn.gnome.org/viewvc/f-spot?rev=4186&view=rev

Log:
be sure to invalidate the first thumbnail


Modified:
   trunk/src/PhotoStore.cs

Modified: trunk/src/PhotoStore.cs
==============================================================================
--- trunk/src/PhotoStore.cs	(original)
+++ trunk/src/PhotoStore.cs	Wed Jul 16 13:25:10 2008
@@ -74,15 +74,17 @@
 			try {
 				thumbnail = ((FSpot.IThumbnailContainer)img).GetEmbeddedThumbnail ();
 			} catch (Exception e) {
-				System.Console.WriteLine (e.ToString ());
+				Log.DebugFormat ("Exception while loading embedded thumbail {0}", e.ToString ());
 			}
 		}
 
 		// Save embedded thumbnails in a silightly invalid way so that we know to regnerate them later.
-		if (thumbnail != null) 
+		if (thumbnail != null) {
 			PixbufUtils.SaveAtomic (thumbnail, FSpot.ThumbnailGenerator.ThumbnailPath (uri), 
 						"png", new string [] { null} , new string [] { null});
-		else 
+			//FIXME with gio, set it to uri time minus a few sec
+			System.IO.File.SetLastWriteTime (FSpot.ThumbnailGenerator.ThumbnailPath (uri), new DateTime (1980, 1, 1));
+		} else 
 			thumbnail = FSpot.ThumbnailGenerator.Create (uri);
 		
 		return thumbnail;



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