Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
postprocessing
Media Converter
Commits
d573be28
Verified
Commit
d573be28
authored
Feb 16, 2022
by
Sebastian Schüpbach
Browse files
fix file name in image thumbnail report
parent
196930a8
Pipeline
#43095
passed with stages
in 6 minutes and 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/scala/ch/memobase/MediaTransformations.scala
View file @
d573be28
...
...
@@ -32,11 +32,15 @@ object MediaTransformations extends Logging {
import
sys.process._
private
def
executeCommand
(
command
:
String
)
:
Try
[
Int
]
=
Try
{
logger
.
debug
(
s
"Execute: $command"
)
val
stderr
=
StringBuilder
.
newBuilder
val
errorCode
=
command
!
ProcessLogger
(
logger
.
debug
(
_
),
stderr
append
_
)
if
(
errorCode
>
0
)
{
throw
new
IOException
(
s
"application ${command.split(' ')(0)} exited with code $errorCode: ${stderr.toString()}"
)
val
errorMsg
=
s
"application ${command.split(' ')(0)} exited with code $errorCode: ${stderr.toString()}"
logger
.
warn
(
errorMsg
)
throw
new
IOException
(
errorMsg
)
}
else
{
logger
.
debug
(
"Command execution successful"
)
errorCode
}
}
...
...
src/main/scala/ch/memobase/RecordProcessor.scala
View file @
d573be28
...
...
@@ -110,7 +110,7 @@ class RecordProcessor(fileHandler: DisseminationCopyHandler,
val
destPreviewFile
=
cachedImageFilePath
(
id
,
mimeType
)
val
(
width
,
height
)
=
getThumbnailDimensions
val
resThumbnail
=
fileHandler
.
createImageThumbnail
(
destImageFile
,
destPreviewFile
,
width
,
height
)
val
outcomeThumbnail
=
createOutcome
(
resThumbnail
,
id
,
ImageThumbnail
,
dest
Image
File
)
val
outcomeThumbnail
=
createOutcome
(
resThumbnail
,
id
,
ImageThumbnail
,
dest
Preview
File
)
outcomeMediaFile
++
outcomeThumbnail
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment