              serializer = Serializer.get_serializer(self.args.serializer)
          print("Using {} serializer".format(serializer.ext))
          return serializer
  
      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
  
      def load(self):
          """ Load the alignments data if it exists or create empty dict """
          data = dict()
          skip_faces = None
          if self.is_extract:
 
</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             serializer = Serializer.get_serializer(self.args.serializer)
        print("Using {} serializer".format(serializer.ext))
 </s> add             # If there is a full filename then this will be overriden
            # by filename extension
            serializer = "json" </s> remove         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
 </s> add         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 </s> remove         if (not hasattr(self.args, "serializer")
                or not self.args.serializer):
            if self.args.alignments_path:
                ext = os.path.splitext(self.args.alignments_path)[-1]
            else:
                ext = "json"
            serializer = Serializer.get_serializer_from_ext(ext)
 </s> add         if hasattr(self.args, "serializer") and self.args.serializer:
            serializer = self.args.serializer </s> remove         self.serializer = self.get_serializer()
        self.location = self.get_location()
        self.have_alignments_file = os.path.exists(self.location)
        self.data = self.load()

    def frames_count(self):
        """ Return current frames count """
        return len(self.data)

    def faces_count(self):
        """ Return current faces count """
        return sum(len(faces) for faces in self.data.values())
 </s> add         self.is_extract = is_extract
        folder, filename = self.set_folder_filename()
        serializer = self.set_serializer()
        super().__init__(folder,
                         filename=filename,
                         serializer=serializer,
                         verbose=self.args.verbose)

    def set_folder_filename(self):
        """ Return the folder for the alignments file"""
        if self.args.alignments_path:
            folder, filename = os.path.split(str(self.args.alignments_path))
        else:
            folder = str(self.args.input_dir)
            filename = "alignments"
        return folder, filename
              serializer = Serializer.get_serializer(self.args.serializer)
          print("Using {} serializer".format(serializer.ext))
          return serializer
  











      def load(self):
          """ Load the alignments data if it exists or create empty dict """
          data = dict()
          skip_faces = None
          if self.is_extract:
keep keep keep keep 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