  
      def load(self):
          """ Load the alignments data if it exists or create empty dict """
          data = dict()
          skip_faces = None
          if self.is_extract:
              skip_existing = bool(hasattr(self.args, 'skip_existing')
                                   and self.args.skip_existing)
              skip_faces = bool(hasattr(self.args, 'skip_faces')
                                and self.args.skip_faces)
  
              if not self.have_alignments_file:
                  if skip_existing or skip_faces:
                      print("Skip Existing/Skip Faces selected, but no "
                            "alignments file found!")
                  return data
              if not skip_existing and not skip_faces:
                  return data
  
          try:
              with open(self.location, self.serializer.roptions) as align:
                  data = self.serializer.unmarshal(align.read())
  
 
</s> remove         """ Load the alignments data if it exists or create empty dict """
 </s> add         """ Override  parent loader to handle skip existing on extract """ </s> remove             with open(self.location, self.serializer.roptions) as align:
 </s> add             with open(self.file, self.serializer.roptions) as align: </s> remove     def get_location(self):
        """ Return the path to alignments file """
        if self.args.alignments_path:
            alignfile = self.args.alignments_path
        else:
            alignfile = os.path.join(
                str(self.args.input_dir),
                "alignments.{}".format(self.serializer.ext))
        print("Alignments filepath: %s" % alignfile)
        return alignfile

 </s> add  </s> remove 
        except Exception as err:
            print("{} not read!".format(self.location))
            print(str(err))
            data = dict()
 </s> add         except IOError as err:
            print("Error: {} not read: {}".format(self.file, err.strerror))
            exit(1) </s> remove         return dst_fmt

    def set_destination_serializer(self):
        """ set the destination serializer """
        self.serializer = Serializer.get_serializer(self.dst_format)

    def load(self):
        """ Read the alignments data from the correct format """
        print("Loading alignments from {}".format(self.file))
        with open(self.file, self.serializer.roptions) as align:
            alignments = self.serializer.unmarshal(align.read())
        return alignments
 </s> add         self.serializer = self.get_serializer("", dst_fmt)
        filename = os.path.splitext(self.file)[0]
        self.file = "{}.{}".format(filename, self.serializer.ext)
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
  
      def load(self):
          """ Load the alignments data if it exists or create empty dict """
          data = dict()
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, 'skip_existing')
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, 'skip_faces')
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data
  
          try:
              with open(self.location, self.serializer.roptions) as align:
                  data = self.serializer.unmarshal(align.read())
  
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Fix convert-adjust (#531)

* Add dimensions to alignments + refactor

* Add frame_dims + funcs to DetectFaces. Add alignments lib

* Convert Adjust working

* Refactor and tidy up 
scripts/fsmedia.py