  
      def process(self):
          """ Execute the sort process """
          logger.info("[SORT INDEXES]")  # Tidy up cli output
          self.check_rotated()
          self.reindex_faces()
          self.alignments.save()
  
      def check_rotated(self):
          """ Legacy rotated alignments will not have the correct x, y
              positions, so generate a warning and exit """
          if any(alignment.get("r", None)
                 for val in self.alignments.data.values()
                 for alignment in val):
 
</s> remove             positions, so generate a warning and exit """
        if any(alignment.get("r", None)
               for val in self.alignments.data.values()
               for alignment in val):
            logger.error("There are rotated frames in the alignments "
                         "file. Position of faces will not be correctly "
                         "calculated for these frames. You should run rotation "
                         "tool to update the file prior to running sort: "
                         "'python tools.py alignments -j rotate -a "
                         "<alignments_file> -fr <frames_folder>'")
 </s> add             positions. Faces without hashes won't process.
            Check for these and generate a warning and exit """
        rotated = self.alignments.get_legacy_rotation()
        hashes = self.alignments.get_legacy_no_hashes()
        if rotated or hashes:
            logger.error("Legacy alignments found. Sort cannot continue. You should run legacy "
                         "tool to update the file prior to running sort: 'python tools.py "
                         "alignments -j legacy -a <alignments_file> -fr <frames_folder> -fc "
                         "<faces_folder>'") </s> remove         return Faces(arguments.faces_dir)
 </s> add         faces = Faces(arguments.faces_dir)
        legacy = Legacy(self.alignments, None, faces=faces, child_process=True)
        legacy.process()
        return faces </s> remove         if self.child_process and not rotated and not no_dims:
 </s> add         hashes = self.alignments.get_legacy_no_hashes()
        if (not self.frames or (not no_dims and not rotated)) and (not self.faces or not hashes): </s> remove         if self.alignments.file == "dfl":
 </s> add         if self.alignments.file == "dfl.json": </s> remove         legacy = Legacy(self.alignments, self.arguments,
                        frames=self.frames, child_process=True)
 </s> add         legacy = Legacy(self.alignments, None, frames=self.frames, child_process=True)
        self.check_legacy()
        reindexed = self.reindex_faces()
        if reindexed:
            self.alignments.save()
        if self.faces:
            rename = Rename(self.alignments, None, self.faces)
            rename.process()

    def check_legacy(self):
  
      def process(self):
          """ Execute the sort process """
          logger.info("[SORT INDEXES]")  # Tidy up cli output
        self.check_legacy()
        reindexed = self.reindex_faces()
        if reindexed:
            self.alignments.save()
        if self.faces:
            rename = Rename(self.alignments, None, self.faces)
            rename.process()

    def check_legacy(self):
        self.check_legacy()
        reindexed = self.reindex_faces()
        if reindexed:
            self.alignments.save()
        if self.faces:
            rename = Rename(self.alignments, None, self.faces)
            rename.process()

    def check_legacy(self):
        self.check_legacy()
        reindexed = self.reindex_faces()
        if reindexed:
            self.alignments.save()
        if self.faces:
            rename = Rename(self.alignments, None, self.faces)
            rename.process()

    def check_legacy(self):
        self.check_legacy()
        reindexed = self.reindex_faces()
        if reindexed:
            self.alignments.save()
        if self.faces:
            rename = Rename(self.alignments, None, self.faces)
            rename.process()

    def check_legacy(self):
        self.check_legacy()
        reindexed = self.reindex_faces()
        if reindexed:
            self.alignments.save()
        if self.faces:
            rename = Rename(self.alignments, None, self.faces)
            rename.process()

    def check_legacy(self):
          """ Legacy rotated alignments will not have the correct x, y
              positions, so generate a warning and exit """
          if any(alignment.get("r", None)
                 for val in self.alignments.data.values()
                 for alignment in val):
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Add Face Hashes to Alignments (#550)

* Convert main scripts to use face hashes

* Alignment tool: Use hashes, add logging, add face rename function

* More logging. Update Manual tool to work with hashing 
tools/lib_alignments/jobs.py