          logger.debug("Merging alignment: (frame: %s, src_idx: %s, hash: %s)",
                       frame, idx, alignment["hash"])
          self.final_alignments.data.setdefault(frame, list()).append(alignment)
  
      def set_destination_filename(self):
          """ Set the destination filename """
          folder = os.path.split(self.final_alignments.file)[0]
          ext = os.path.splitext(self.final_alignments.file)[1]
 
</s> remove         existing_frame = self.final_alignments.hashes_to_frame.get(alignment["hash"], None)
 </s> add         existing_frame = self._hashes_to_frame.get(alignment["hash"], None) </s> remove     def remove_alignment(self, item):
        """ Remove the alignment from the alignments file """
        del_count = 0
        frame_name, alignments, number_alignments = item[:3]
        for idx in self.alignments.yield_original_index_reverse(alignments, number_alignments):
            face_indexes = self.items.items.get(frame_name, [-1])
            if idx not in face_indexes:
                del alignments[idx]
                self.removed.add(frame_name)
                logger.verbose("Removed alignment data for image: '%s' index: %s",
                               frame_name, str(idx))
                del_count += 1
            else:
                logger.trace("Not removing alignment data for image: '%s' index: %s",
                             frame_name, str(idx))
        return del_count

 </s> add  </s> remove             retval = list(Frames(arguments.frames_dir).items.keys())
 </s> add             retval = Frames(arguments.frames_dir).items </s> remove     def rename_faces(self, frame, frame_fullname):
 </s> add     def rename_faces(self, frame, frame_fullname, details):
        self.hashes_to_frame.setdefault(alignment["hash"], dict())[frame] = idx
          logger.debug("Merging alignment: (frame: %s, src_idx: %s, hash: %s)",
                       frame, idx, alignment["hash"])
        self.hashes_to_frame.setdefault(alignment["hash"], dict())[frame] = idx
          self.final_alignments.data.setdefault(frame, list()).append(alignment)
  
      def set_destination_filename(self):
          """ Set the destination filename """
          folder = os.path.split(self.final_alignments.file)[0]
          ext = os.path.splitext(self.final_alignments.file)[1]
keep add keep keep keep keep keep keep
 Multiple Tools->Alignmet speed ups (#785) 
tools/lib_alignments/jobs.py