From Andrei in #dev:
https://github.com/nuxeo/nuxeo-platform-video/blob/master/nuxeo-platform-video-core/src/main/java/org/nuxeo/ecm/platform/video/service/VideoConversionWork.java#L124 this method will create duplicates on regeneration of videos, let’s say on an operation call.
Something like that should be called.
@SuppressWarnings("unchecked") List<Map<String, Serializable>> propertyValue = (List<Map<String, Serializable>>) doc.getPropertyValue(TRANSCODED_VIDEO_PROP); if (propertyValue == null) { propertyValue = new ArrayList<>(); } List<Map<String, Serializable>> transcoded = propertyValue.stream() .filter(map -> !transcodedVideo.getName().equals(map.get("name"))) .collect(Collectors.toList()); transcoded.add(transcodedVideo.toMap());