Skip to content

Commit

Permalink
Merge branch 'OC-5687-process-smil-tag-with-profile' of harvard-dce/o…
Browse files Browse the repository at this point in the history
…pencast-contrib into r/15.x

Pull request #5689

  Process-smil WOH tag-with-profile configuration does not work depending on the encoding profile suffix configured
  • Loading branch information
gregorydlogan committed Apr 12, 2024
2 parents eb0223d + 9ddea70 commit bd34271
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,13 @@ private WorkflowOperationResult multiencode(MediaPackage src, WorkflowOperationI
private void tagByProfile(Track track, List<EncodingProfile> profiles) {
String rawfileName = track.getURI().getRawPath();
for (EncodingProfile ep : profiles) {
String suffix = ep.getSuffix();
// #DCE
// Add any character at the beginning of the suffix so that it is properly
// converted in toSafeName (because the regex used there may treat the first
// character differently; the default one does now).
String suffixToSanitize = "X" + ep.getSuffix();
// !! workspace.putInCollection renames the file - need to do the same with suffix
suffix = workspace.toSafeName(suffix);
String suffix = workspace.toSafeName(suffixToSanitize).substring(1);
if (suffix.length() > 0 && rawfileName.endsWith(suffix)) {
track.addTag(ep.getIdentifier());
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,12 @@ private void processSection(Map<Job, JobInformation> encodingJobs, MediaPackage
private void tagByProfile(Track track, List<EncodingProfile> profiles) {
String rawfileName = track.getURI().getRawPath();
for (EncodingProfile ep : profiles) {
String suffix = ep.getSuffix();
// #5687: Add any character at the beginning of the suffix so that it is properly
// converted in toSafeName (because the regex used there may treat the first
// character differently; the default regex currently does).
String suffixToSanitize = "X" + ep.getSuffix();
// !! workspace.putInCollection renames the file - need to do the same with suffix
suffix = workspace.toSafeName(suffix);
String suffix = workspace.toSafeName(suffixToSanitize).substring(1);
if (suffix.length() > 0 && rawfileName.endsWith(suffix)) {
track.addTag(ep.getIdentifier());
return;
Expand Down

0 comments on commit bd34271

Please sign in to comment.