private void ensureRootAlbum() {
    MediaAlbum rootAlbum =
        new MediaAlbum(
            ROOT_ALBUM, ROOT_ALBUM, "A copy of your transferred media that were not in any album");
    boolean usedRootAlbum = false;

    for (PhotoModel photo : photos) {
      if (photo.getAlbumId() == null) {
        photo.reassignToAlbum(rootAlbum.getId());
        usedRootAlbum = true;
      }
    }

    for (VideoModel video : videos) {
      if (video.getAlbumId() == null) {
        video.reassignToAlbum(rootAlbum.getId());
        usedRootAlbum = true;
      }
    }

    if (usedRootAlbum) {
      List<MediaAlbum> tempMutableAlbums = this.albums.stream().collect(Collectors.toList());
      tempMutableAlbums.add(rootAlbum);
      this.albums = ImmutableList.copyOf(tempMutableAlbums);
    }
  }
Extracts a new VideosContainerResource from the relevant matching fields in a given
MediaContainerResource.
portability-types-common/src/main/java/org/datatransferproject/types/common/models/media/MediaContainerResource.java