HomeSoftware Heritage

browse/directory: Refactor metadata handling and add typing