def add_links_to_upload_list(self, links):
        for link in links:
            ext = gf.extract_extension(link)
            if ext[3] == 'preview':
                self.links_to_upload_list.add(link)

        self.links_to_upload_list = set(self.links_to_upload_list)

        self.drop_plate_label.setText(
            'Drop Images Here ({0})'.format(len(self.get_upload_list()) + len(self.screenshots_to_upload_list)))
 def browse_for_preview(self):
     options = QtGui.QFileDialog.Options()
     options |= QtGui.QFileDialog.DontUseNativeDialog
     file_name, filter = QtGui.QFileDialog.getOpenFileName(
         self, 'Browse for Preview Image', '',
         'All Images (*.jpg | *.jpeg | *.png | *.tif);;'
         'JPEG Images (*.jpg | *.jpeg);;'
         'PNG Images (*.png);;'
         'TIF Images (*.tif)', '', options)
     if file_name:
         ext = gf.extract_extension(file_name)
         if ext[3] == 'preview':
             self.add_links_to_upload_list([file_name])