Skip to content

Commit de460f8

Browse files
committed
Merge r/15.x into develop
2 parents fcce0ec + de3a5db commit de460f8

File tree

9 files changed

+133
-8
lines changed

9 files changed

+133
-8
lines changed

docs/guides/admin/docs/changelog.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@ Changelog
44
Opencast 15
55
-----------
66

7+
### Opencast 15.4
8+
9+
- [[#5738](https://github.com/opencast/opencast/pull/5738)] -
10+
Update (New) Admin UI to 2024-04-10
11+
- [[#5696](https://github.com/opencast/opencast/pull/5696)] -
12+
Mark RPMs as available
13+
- [[#5689](https://github.com/opencast/opencast/pull/5689)] -
14+
Process-smil WOH tag-with-profile configuration does not work depending on the encoding profile suffix configured
15+
- [[#5686](https://github.com/opencast/opencast/pull/5686)] -
16+
Fix editor track selection for updating tags
17+
- [[#5678](https://github.com/opencast/opencast/pull/5678)] -
18+
Remove Spurious Warnings During Build
19+
- [[#5677](https://github.com/opencast/opencast/pull/5677)] -
20+
Fix more JavaDoc
21+
- [[#5675](https://github.com/opencast/opencast/pull/5675)] -
22+
Add synchronous deletion to Search API
23+
- [[#5673](https://github.com/opencast/opencast/pull/5673)] -
24+
Paella7: Avoid opening downloaded video
25+
- [[#5670](https://github.com/opencast/opencast/pull/5670)] -
26+
Make a dynamic OSGi dependency static
27+
- [[#5669](https://github.com/opencast/opencast/pull/5669)] -
28+
Update temporal if empty
29+
- [[#5588](https://github.com/opencast/opencast/pull/5588)] -
30+
Update typescript type definitions in ltitools
31+
732
### Opencast 15.3
833

934
- [[#5669](https://github.com/opencast/opencast/pull/5669)] -
@@ -497,6 +522,15 @@ Opencast 15
497522
Opencast 14
498523
-----------
499524

525+
### Opencast 14.11
526+
527+
*Released on April 16th, 2024*
528+
529+
- [[#5682](https://github.com/opencast/opencast/pull/5682)] -
530+
Quickfix dangling hard links on cephfs volumes
531+
- [[#5667](https://github.com/opencast/opencast/pull/5667)] -
532+
Fixed NPE on filtering data
533+
500534
### Opencast 14.10
501535

502536
*Released on March 14th, 2024*

modules/admin-ui-interface/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<properties>
1414
<opencast.basedir>${project.basedir}/../..</opencast.basedir>
1515
<checkstyle.skip>false</checkstyle.skip>
16-
<interface.url>https://github.com/opencast/opencast-admin-interface/releases/download/2024-01-17/oc-admin-ui-2024-01-17.tar.gz</interface.url>
17-
<interface.sha256>cd96df41bb6821a413d1e7c11a9bb42f6453be59a59bb15e76cf6b90a5686caa</interface.sha256>
16+
<interface.url>https://github.com/opencast/opencast-admin-interface/releases/download/2024-04-10/oc-admin-ui-2024-04-10.tar.gz</interface.url>
17+
<interface.sha256>2b2a8628472b19bfdd8e9cf609beb546c6298e41ff3aecb81e4bdacaf51ccd4e</interface.sha256>
1818
</properties>
1919
<build>
2020
<plugins>

modules/composer-workflowoperation/src/main/java/org/opencastproject/workflow/handler/composer/MultiEncodeWorkflowOperationHandler.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,13 @@ private WorkflowOperationResult multiencode(MediaPackage src, WorkflowOperationI
469469
private void tagByProfile(Track track, List<EncodingProfile> profiles) {
470470
String rawfileName = track.getURI().getRawPath();
471471
for (EncodingProfile ep : profiles) {
472-
String suffix = ep.getSuffix();
472+
// #DCE
473+
// Add any character at the beginning of the suffix so that it is properly
474+
// converted in toSafeName (because the regex used there may treat the first
475+
// character differently; the default one does now).
476+
String suffixToSanitize = "X" + ep.getSuffix();
473477
// !! workspace.putInCollection renames the file - need to do the same with suffix
474-
suffix = workspace.toSafeName(suffix);
478+
String suffix = workspace.toSafeName(suffixToSanitize).substring(1);
475479
if (suffix.length() > 0 && rawfileName.endsWith(suffix)) {
476480
track.addTag(ep.getIdentifier());
477481
return;

modules/composer-workflowoperation/src/main/java/org/opencastproject/workflow/handler/composer/ProcessSmilWorkflowOperationHandler.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,9 +493,12 @@ private void processSection(Map<Job, JobInformation> encodingJobs, MediaPackage
493493
private void tagByProfile(Track track, List<EncodingProfile> profiles) {
494494
String rawfileName = track.getURI().getRawPath();
495495
for (EncodingProfile ep : profiles) {
496-
String suffix = ep.getSuffix();
496+
// #5687: Add any character at the beginning of the suffix so that it is properly
497+
// converted in toSafeName (because the regex used there may treat the first
498+
// character differently; the default regex currently does).
499+
String suffixToSanitize = "X" + ep.getSuffix();
497500
// !! workspace.putInCollection renames the file - need to do the same with suffix
498-
suffix = workspace.toSafeName(suffix);
501+
String suffix = workspace.toSafeName(suffixToSanitize).substring(1);
499502
if (suffix.length() > 0 && rawfileName.endsWith(suffix)) {
500503
track.addTag(ep.getIdentifier());
501504
return;

modules/search-service-api/src/main/java/org/opencastproject/search/api/SearchService.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ void addSynchronously(MediaPackage mediaPackage)
9797
*/
9898
Job deleteSeries(String seriesId) throws SearchException, UnauthorizedException, NotFoundException;
9999

100+
/**
101+
* Immediately removes the given mediapackage from the search service.
102+
*
103+
* @param mediaPackageId
104+
* the mediapackage
105+
* @return <code>true</code> if the mediapackage was deleted
106+
* @throws SearchException
107+
* if deletion failed
108+
*/
109+
boolean deleteSynchronously(String mediaPackageId) throws SearchException;
110+
100111
/**
101112
* Find search results based on the specified query object
102113
*

modules/search-service-impl/src/main/java/org/opencastproject/search/endpoint/SearchRestService.java

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,47 @@ public Response remove(@PathParam("id") String mediaPackageId) throws SearchExce
223223
}
224224
}
225225

226+
@DELETE
227+
@Path("removeSynchronously/{id}")
228+
@Produces(MediaType.APPLICATION_XML)
229+
@RestQuery(
230+
name = "remove",
231+
description = "Removes a mediapackage from the search index.",
232+
pathParameters = {
233+
@RestParameter(
234+
description = "The media package ID to remove from the search index.",
235+
isRequired = true,
236+
name = "id",
237+
type = RestParameter.Type.STRING
238+
)
239+
},
240+
responses = {
241+
@RestResponse(description = "OK", responseCode = HttpServletResponse.SC_OK),
242+
@RestResponse(
243+
description = "The mediapackage could not be delete by you or does not exist",
244+
responseCode = HttpServletResponse.SC_BAD_REQUEST
245+
),
246+
@RestResponse(
247+
description = "There has been an internal error and the mediapackage could not be deleted",
248+
responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR
249+
)
250+
},
251+
returnDescription = "Nothing"
252+
)
253+
public Response removeSynchronously(@PathParam("id") String mediaPackageId) throws SearchException {
254+
try {
255+
boolean removed = searchService.deleteSynchronously(mediaPackageId);
256+
if (removed) {
257+
return Response.ok().build();
258+
} else {
259+
return Response.status(Response.Status.BAD_REQUEST).build();
260+
}
261+
} catch (Exception e) {
262+
logger.info("Unable to remove mediapackage {} from search index: {}", mediaPackageId, e.getMessage());
263+
return Response.serverError().build();
264+
}
265+
}
266+
226267
@DELETE
227268
@Path("/seriesId/{seriesid}")
228269
@Produces(MediaType.APPLICATION_XML)

modules/search-service-remote/src/main/java/org/opencastproject/search/remote/SearchServiceRemoteImpl.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,28 @@ public Job delete(String mediaPackageId) throws SearchException {
159159
throw new SearchException("Unable to remove " + mediaPackageId + " from a remote search service");
160160
}
161161

162+
/**
163+
* {@inheritDoc}
164+
*
165+
* @see org.opencastproject.search.api.SearchService#deleteSynchronously(java.lang.String)
166+
*/
167+
@Override
168+
public boolean deleteSynchronously(String mediaPackageId) throws SearchException {
169+
HttpDelete del = new HttpDelete("/removeSynchronously/" + mediaPackageId);
170+
HttpResponse response = getResponse(del);
171+
try {
172+
if (response != null) {
173+
logger.info("Removing mediapackage '{}' from a remote search service", mediaPackageId);
174+
return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK;
175+
}
176+
} catch (Exception e) {
177+
throw new SearchException("Unable to remove " + mediaPackageId + " from a remote search service", e);
178+
} finally {
179+
closeConnection(response);
180+
}
181+
182+
throw new SearchException("Unable to remove " + mediaPackageId + " from a remote search service");
183+
}
162184

163185
/**
164186
* {@inheritDoc}

modules/videoeditor-ffmpeg-impl/src/main/java/org/opencastproject/videoeditor/impl/VideoEditorServiceImpl.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import org.opencastproject.mediapackage.MediaPackageElementFlavor;
3232
import org.opencastproject.mediapackage.MediaPackageElementParser;
3333
import org.opencastproject.mediapackage.MediaPackageException;
34+
import org.opencastproject.mediapackage.MediaPackageReference;
35+
import org.opencastproject.mediapackage.MediaPackageReferenceImpl;
3436
import org.opencastproject.mediapackage.Track;
3537
import org.opencastproject.mediapackage.identifier.IdImpl;
3638
import org.opencastproject.security.api.OrganizationDirectoryService;
@@ -193,12 +195,15 @@ protected Track processSmil(Job job, Smil smil, String trackParamGroupId) throws
193195
}
194196
MediaPackageElementFlavor sourceTrackFlavor = null;
195197
String sourceTrackUri = null;
198+
MediaPackageReference ref = null;
196199
// get source track metadata
197200
for (SmilMediaParam param : trackParamGroup.getParams()) {
198201
if (SmilMediaParam.PARAM_NAME_TRACK_SRC.equals(param.getName())) {
199202
sourceTrackUri = param.getValue();
200203
} else if (SmilMediaParam.PARAM_NAME_TRACK_FLAVOR.equals(param.getName())) {
201204
sourceTrackFlavor = MediaPackageElementFlavor.parseFlavor(param.getValue());
205+
} else if (SmilMediaParam.PARAM_NAME_TRACK_ID.equals(param.getName())) {
206+
ref = new MediaPackageReferenceImpl("track", param.getValue());
202207
}
203208
}
204209
File sourceFile;
@@ -411,14 +416,15 @@ protected Track processSmil(Job job, Smil smil, String trackParamGroupId) throws
411416
Track editedTrack = (Track) MediaPackageElementParser.getFromXml(inspectionJob.getPayload());
412417
logger.info("Finished editing track {}", editedTrack);
413418
editedTrack.setIdentifier(newTrackId);
419+
editedTrack.setReference(ref);
414420
if (videoclips.size() > 0) {
415421
editedTrack.setFlavor(new MediaPackageElementFlavor(sourceTrackFlavor.getType(), SINK_FLAVOR_SUBTYPE));
416422
}
417423
if (refElements.size() > 0) {
418424
String extension = FilenameUtils.getExtension(sourceTrackUri);
419425
if (VideoEditorProperties.WEBVTT_EXTENSION.equals(extension)) {
420426
editedTrack.setFlavor(new MediaPackageElementFlavor(sourceTrackFlavor.getType(),
421-
sourceTrackFlavor.getSubtype() + "+" + SINK_FLAVOR_SUBTYPE));
427+
sourceTrackFlavor.getSubtype() + "+" + SINK_FLAVOR_SUBTYPE));
422428
}
423429
}
424430

modules/videoeditor-workflowoperation/src/main/java/org/opencastproject/workflow/handler/videoeditor/VideoEditorWorkflowOperationHandler.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,11 @@ public WorkflowOperationResult resume(WorkflowInstance workflowInstance, JobCont
570570
editedTrack.getIdentifier(), FilenameUtils.getName(editedTrack.getURI().toString()));
571571
editedTrack.setURI(editedTrackNewUri);
572572
for (Track track : sourceTracks) {
573-
if (track.getFlavor().getType().equals(editedTrackFlavor.getType())) {
573+
var reference = editedTrack.getReference();
574+
if (reference == null) {
575+
logger.warn("Edited track {} has no reference track assigned; skip restoring tags.",
576+
editedTrack.getIdentifier());
577+
} else if (track.getIdentifier().equals(reference.getIdentifier())) {
574578
editedTrack.setTags(track.getTags());
575579
mp.addDerived(editedTrack, track);
576580
mpAdded = true;

0 commit comments

Comments
 (0)