Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-24328

Video conversion work may store duplicate transcoded blobs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 9.10
    • Fix Version/s: 10.1
    • Component/s: DAM

      Description

      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());
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h