Update
This commit is contained in:
parent
58c394cea7
commit
48d76fdc31
@ -87,9 +87,14 @@ class VideoConsumer: DefaultKafkaReader("collectorConsumerEncodedVideo"), IColle
|
|||||||
val coverFile = metadata?.cover?.let { coverUrl ->
|
val coverFile = metadata?.cover?.let { coverUrl ->
|
||||||
runBlocking {
|
runBlocking {
|
||||||
try {
|
try {
|
||||||
Downloader(coverUrl, CommonConfig.outgoingContent, fileData.title).download()
|
val _file = Downloader(coverUrl, CommonConfig.outgoingContent, fileData.title).download()
|
||||||
|
if (_file == null || !_file.exists()) {
|
||||||
|
logger.info { "Failed to download the file" }
|
||||||
|
}
|
||||||
|
_file
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
// No cover
|
// No cover
|
||||||
|
e.printStackTrace()
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user