f-spot r4211 - trunk/dpap-sharp/DPAPService



Author: apart
Date: Mon Jul 28 20:46:28 2008
New Revision: 4211
URL: http://svn.gnome.org/viewvc/f-spot?rev=4211&view=rev

Log:
Use the "Shared items" tag to select photos to-be shared


Modified:
   trunk/dpap-sharp/DPAPService/DPAPService.cs

Modified: trunk/dpap-sharp/DPAPService/DPAPService.cs
==============================================================================
--- trunk/dpap-sharp/DPAPService/DPAPService.cs	(original)
+++ trunk/dpap-sharp/DPAPService/DPAPService.cs	Mon Jul 28 20:46:28 2008
@@ -66,8 +66,11 @@
 			
 			
 			Album a = new Album("test album");
-			FSpot.Photo [] photos = Core.Database.Photos.Query ((Tag [])null, null, null, null);
-			int i=0;
+			Tag t = Core.Database.Tags.GetTagByName("Shared items");
+			
+			Tag []tags = {t};
+			FSpot.Photo [] photos = Core.Database.Photos.Query(tags);
+			
 			foreach(FSpot.Photo photo in photos)
 			{
 				string thumbnail_path = ThumbnailGenerator.ThumbnailPath (photo.DefaultVersionUri);				
@@ -77,9 +80,9 @@
 				
 				if(!f.Exists) 
 					continue;
-				if(++i > 5) break;
+				//if(++i > 5) break;
 				Console.WriteLine("Found photo " + photo.DefaultVersionUri + ", thumb " + thumbnail_path);
-				p.Title = photo.Name;
+				p.Title = f.Name;
 				p.Size = (int)f.Length; 
 				p.Format = "JPEG";
 				database.AddPhoto(p);



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