~pyshareteam/pyshare/0.6

« back to all changes in this revision

Viewing changes to PyShare_GTK.py

  • Committer: Sebastian Kacprzak
  • Date: 2011-02-06 15:32:30 UTC
  • Revision ID: naicik@gmail.com-20110206153230-lh0tnr4dtmwmdjud
make uploading with password from Imageshack_us work

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
        otherwise it sets proggressbar message to indicate upload failure
119
119
        imageLinks and file are ignored if errorOccured is True"""
120
120
        if not errorOccured:
121
 
             self.links[fileNumber] = imageLinks[0] # there is one thread per file so this should be thread safe
122
 
             db.addFile(getUploader(file).getName(), imageLinks[2][0], imageLinks[2][1], imageLinks[2][2], os.path.basename(file), os.path.getsize(file),file.split('.')[-1].lower(), getMimeTypes(file))
123
 
             if isImage(getMimeTypes(file)):
124
 
                 saveThumbnail(createThumbnail(file), file, imageLinks[2][0])
 
121
            print imageLinks
 
122
            self.links[fileNumber] = imageLinks[0] # there is one thread per file so this should be thread safe
 
123
            db.addFile(getUploader(file).NAME, imageLinks[2][0], imageLinks[2][1], imageLinks[2][2], os.path.basename(file), os.path.getsize(file),file.split('.')[-1].lower(), getMimeTypes(file))
 
124
            if isImage(getMimeTypes(file)):
 
125
                saveThumbnail(createThumbnail(file), file, imageLinks[2][0])
125
126
        self.__uploadsCompletedLock.acquire()
126
127
        try: #rather not needed
127
128
            self.__uploadsCompleted += 1
392
393
            separator.show()
393
394
 
394
395
            addedFiles.append(file)
395
 
            uploadFileWrapper(uploader,self.fileUploadFailed,file,self.fileUploaded,self.progress,totalNumberOfFiles, self.__semaphore)
 
396
            uploadFileWrapper(uploader,self.fileUploadFailed,
 
397
                file,self.fileUploaded,self.progress,totalNumberOfFiles, self.__semaphore)
396
398
            totalNumberOfFiles += 1
397
399
            
398
400
        if firstAdding: