          for idx, i_hash in hashes.items():
              faces[idx]["hash"] = i_hash
  
  
  class MediaLoader():
      """ Class to load filenames from folder """
      def __init__(self, folder):
 
</s> remove     # Serializer is now a compressed pickle .fsa format. This used to be any number of serializers
    def test_for_legacy(self, location):
        """ For alignments filenames passed in with out an extension, test for legacy formats """
 </s> add     # Serializer is now a compressed pickle custom format. This used to be any number
    # of serializers
    def _test_for_legacy(self, location):
        """ For alignments filenames passed in without an extension, test for legacy
        serialization formats and update to current ``.fsa`` format if any are found.

        Parameters
        ----------
        location: str
            The folder location to check for legacy alignments
        """ </s> remove         alignments.setdefault(sourcefile, list()).append(alignment)
 </s> add         alignments.setdefault(sourcefile, dict()).setdefault("faces", []).append(alignment) </s> remove     def filter_hashes(self, hashlist, filter_out=False):
        """ Filter in or out faces that match the hash list
 </s> add     def filter_hashes(self, hash_list, filter_out=False):
        """ Remove faces from :attr:`data` based on a given hash list. </s> remove         self.final_alignments.data.setdefault(frame, list()).append(alignment)
 </s> add         self.final_alignments.data.setdefault(frame,
                                              dict()).setdefault("faces", []).append(alignment) </s> remove             exit(0)
 </s> add             sys.exit(1)
    def data_from_dfl(self, alignments, faces_folder):
        """ Set :attr:`data` from alignments extracted from a Deep Face Lab face set.

        Parameters
        ----------
        alignments: dict
            The extracted alignments from a Deep Face Lab face set
        faces_folder: str
            The folder that the faces are in, where the newly generated alignments file will
            be saved
        """
        self._data = alignments
        self._file = self._get_location(faces_folder, "alignments")

          for idx, i_hash in hashes.items():
              faces[idx]["hash"] = i_hash
  
    def data_from_dfl(self, alignments, faces_folder):
        """ Set :attr:`data` from alignments extracted from a Deep Face Lab face set.

        Parameters
        ----------
        alignments: dict
            The extracted alignments from a Deep Face Lab face set
        faces_folder: str
            The folder that the faces are in, where the newly generated alignments file will
            be saved
        """
        self._data = alignments
        self._file = self._get_location(faces_folder, "alignments")

  
  class MediaLoader():
      """ Class to load filenames from folder """
      def __init__(self, folder):
keep keep add keep keep keep keep
 lib.alignments - Slight update (#978)

* lib.alignments update:
  - Minor structure change (faces to nested dictionary)
  - Refactor internal and external methods
  - Documentation 
tools/lib_alignments/media.py