Verified Commit 82962fb8 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

send yt/vimeo thumbnail to enrichment pipeline

parent 1c040c34
Pipeline #40904 passed with stages
in 5 minutes and 16 seconds
......@@ -38,7 +38,7 @@ class KafkaTopology extends Logging {
builder.stream[String, String](SettingsFromFile.inputTopic)
val Array(recordWithLocator, locatorlessRecord) = checkForLocators(source)
val Array(enrichableRecordImage, enrichableRecordAV, unenrichableRecord) =
val Array(enrichableRecordAV, enrichableRecordImage, unenrichableRecord) =
checkIfEnrichable(
recordWithLocator
)
......@@ -75,8 +75,8 @@ class KafkaTopology extends Logging {
stream
.mapValues(v => setMediaPlayerType(v))
.branch(
(_, v) => v._2.forall(v => v.enrichable && v.player == ImageViewer),
(_, v) => v._2.forall(_.enrichable),
(_, v) => v._2.forall(_.enrichable) && v._2.exists(_.player != ImageViewer), // AV media with optional thumbnail
(_, v) => v._2.exists(v => v.enrichable && v.player == ImageViewer), // Either image resource or thumbnail
(_, _) => true
)
......
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