Changeset 193

Show
Ignore:
Timestamp:
Sat Nov 10 12:10:36 2007
Author:
manatlan
Message:

- "export plugin" can now export again on picasaweb (re-implementation
of picasaweb api using gdata google api)

Files:

Legend:

Unmodified
Added
Removed
Modified
  • trunk/plugins/multiexport/__init__.py

    r189 r193  
    23 23 from libs.flickr import FlickrUploader  
    24 24  
    25   # for PW (flickr)  
    26   from libs.pycasaweb import PycasaWeb  
      25 # for PW (picasaweb)  
      26 #from libs.pycasaweb import PycasaWeb  
      27 try:  
      28     from libs.picasaweb import *  
      29 except ImportError,m:  
      30     print "*WARNING* Python Import Error :",m  
      31     PicasaWeb = lambda *a : None  
      32  
    27 33  
    28 34 # for SM (send mail)  
     
    148 154       return f  
    149 155  
      156 class PicasaException(Exception): pass  
      157  
    150 158 class Plugin(JPlugin):  
    151 159     """ Multi export plugin"""  
     
    223 231  
    224 232                 try:  
    225                       picasa = PycasaWeb(ec["PW.login"],ec["PW.password"])  
    226                       album=picasa.createAlbum("Jbrout " + time.strftime("%Y-%m-%d, %H-%M-%S"),public=(ec["PW.privacy"]==0))  
      233                     picasa = PicasaWeb(ec["PW.login"],ec["PW.password"])  
      234                     if picasa:  
      235                         album=picasa.createAlbum("Jbrout " + time.strftime("%Y-%m-%d, %H-%M-%S"),public=(ec["PW.privacy"]==0))  
      236                     else:  
      237                         raise PicasaException(_("Sorry, you can't upload to picasewab (python import error)"))  
    227 238                 except Exception,err:  
    228 239                     self.MessageBox(_("Upload error : ")+str(err))  
     
    304 315  
    305 316                         elif type == "PW":  
    306                               album.uploadPhoto(file,photo.comment)  
      317                             # album.uploadPhoto(file,photo.comment) (pycasaweb)  
      318                             album.uploadPhoto(file)  
    307 319                         elif type == "FR":  
    308 320                             err=flickr_uploader.upload(file,photo.comment,photo.tags,window_export.getPrivacyFR(photo))