Commit 8e0b509d authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

439: Support search result preview for audio files (OPENED)

Task-Url: #439
parent 92ef8d7e
Pipeline #25516 passed with stage
in 40 seconds
......@@ -9,7 +9,7 @@ allprojects {
apply plugin: 'eclipse'
group = 'eu.dariah.de.minfba'
version = '4.3.1-SNAPSHOT'
version = '4.3.2-SNAPSHOT'
repositories {
mavenLocal()
......
......@@ -2,6 +2,7 @@ package eu.dariah.de.search.controller.search;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
......@@ -121,12 +122,34 @@ public class ItemController extends BaseController {
List<Resource> titles = ResourceHelper.findRecursive(res, "Title");
List<Resource> links = ResourceHelper.findRecursive(res, "Link");
List<Resource> images = ResourceHelper.findRecursive(res, "Images.Resource");
Map<String, List<Resource>> contentElements = new HashMap<>();
List<Resource> audio = ResourceHelper.findRecursive(res, "MultimediaContent.Audio");
if (!audio.isEmpty()) {
contentElements.put("Audio", audio);
}
List<Resource> video = ResourceHelper.findRecursive(res, "MultimediaContent.Video");
if (!audio.isEmpty()) {
contentElements.put("Video", video);
}
List<Resource> info = ResourceHelper.findRecursive(res, "PrimaryInfo");
if (!audio.isEmpty()) {
contentElements.put("Info", info);
}
List<Resource> frames = ResourceHelper.findRecursive(res, "EmbeddedFrame");
if (!frames.isEmpty()) {
contentElements.put("Frame", frames);
}
model.addAttribute("titles", titles);
model.addAttribute("links", links);
model.addAttribute("images", images);
model.addAttribute("frames", frames);
//model.addAttribute("frames", frames);
//model.addAttribute("primaryInfos", primaryInfos);
model.addAttribute("contentElements", contentElements);
if (titles!=null && !titles.isEmpty()) {
itemIdTitleMap.put(itemId, titles);
......
Subproject commit 6cbfa384269321c75742825c82d9c73c99b8afad
Subproject commit 767b9dbea83f7fccc29f539937fc572a38e5d628
Subproject commit 255e23de4b3262402bd623ef7ca3a09f3016f03d
Subproject commit 9f7b5581481f783778f33b94dc15f7be479ecc0a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment