conduit r1263 - in trunk: . conduit/modules/FspotModule conduit/modules/GoogleModule



Author: thomasvm
Date: Thu Jan 24 20:36:01 2008
New Revision: 1263
URL: http://svn.gnome.org/viewvc/conduit?rev=1263&view=rev

Log:
2008-01-24  Thomas Van Machelen <thomas vanmachelen gmail com>:
	* conduit/modules/FspotModule/FspotDbusModule.py: Handle error when
	delete fails; and more important: the module is configured ok when no
	tag is selected.  When it's used as source it will sync the complete
	f-spot db, when it's used as sink no additional tags will be
	introduced

	* conduit/modules/GoogleModule/GoogleModule.py: Adds the photo tags
	when we're getting a file


Modified:
   trunk/ChangeLog
   trunk/conduit/modules/FspotModule/FspotDbusModule.py
   trunk/conduit/modules/GoogleModule/GoogleModule.py

Modified: trunk/conduit/modules/FspotModule/FspotDbusModule.py
==============================================================================
--- trunk/conduit/modules/FspotModule/FspotDbusModule.py	(original)
+++ trunk/conduit/modules/FspotModule/FspotDbusModule.py	Thu Jan 24 20:36:01 2008
@@ -141,7 +141,10 @@
         Remove the photo from the f-spot catalog
         TODO: add support for deleting from drive also
         """
-        self.photo_remote.RemovePhoto (LUID)
+        try:
+            self.photo_remote.RemovePhoto (LUID)
+        except Exception, ex: # the photo is probably gone in f-spot
+            log.warn("Delete failed (%s)", ex)
     
     def finish(self, aborted, error, conflict):
         """
@@ -230,7 +233,7 @@
         return {"tags": self.enabledTags}
 
     def is_configured (self):
-        return len(self.enabledTags) > 0
+        return True
 
     def get_UID(self):
         return Utils.get_user_string()

Modified: trunk/conduit/modules/GoogleModule/GoogleModule.py
==============================================================================
--- trunk/conduit/modules/GoogleModule/GoogleModule.py	(original)
+++ trunk/conduit/modules/GoogleModule/GoogleModule.py	Thu Jan 24 20:36:01 2008
@@ -558,10 +558,13 @@
         gphoto = self.gphoto_dict[LUID]
         url = gphoto.GetMediaURL()
 
+        tags = (tag.title.text for tag in self.pws.GetFeed(gphoto.GetTagsUri()).entry)
+
         f = Photo.Photo (URI=url)
         f.force_new_mtime(self._get_photo_timestamp(gphoto))
         f.set_open_URI(url)
         f.set_UID(LUID)
+        f.set_tags(tags)
 
         return f
 



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