Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Motion Bank
Services
Transcoder
Commits
3c9529f1
Commit
3c9529f1
authored
Aug 23, 2018
by
A. Koch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix thumb generation
parent
75c0c3b0
Pipeline
#1115
passed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
src/lib/workers/concat.js
src/lib/workers/concat.js
+9
-8
src/lib/workers/convert.js
src/lib/workers/convert.js
+9
-8
No files found.
src/lib/workers/concat.js
View file @
3c9529f1
...
...
@@ -33,21 +33,22 @@ const concatJob = async function (job) {
errored
=
true
}
const
thumbFile
=
`
${
baseName
}
.jpg`
const
thumbPath
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFile
)
const
thumbFileSmall
=
`
${
baseName
}
-s.jpg`
const
thumbPathSmall
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFileSmall
)
const
thumbFileMedium
=
`
${
baseName
}
-m.jpg`
const
thumbPathMedium
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFileMedium
)
try
{
await
ffmpegThumb
(
destination
,
tmpDir
,
1
,
progress
=>
{
job
.
progress
(
60
+
progress
.
percent
*
0.3
)
})
const
thumbFile
=
`
${
baseName
}
.jpg`
const
thumbPath
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFile
)
await
image
.
convert
(
path
.
join
(
tmpDir
,
'
tn.png
'
),
thumbPath
)
const
thumbFileSmall
=
`
${
baseName
}
-s.jpg`
const
thumbPathSmall
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFileSmall
)
await
image
.
convert
(
path
.
join
(
tmpDir
,
'
tn.png
'
),
thumbPathSmall
,
{
resize
:
{
width
:
240
,
height
:
240
}})
const
thumbFileMedium
=
`
${
baseName
}
-m.jpg`
const
thumbPathMedium
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFileMedium
)
await
image
.
convert
(
path
.
join
(
tmpDir
,
'
tn.png
'
),
thumbPathMedium
,
{
resize
:
{
width
:
640
,
height
:
640
}})
}
catch
(
e
)
{
...
...
src/lib/workers/convert.js
View file @
3c9529f1
...
...
@@ -63,20 +63,21 @@ const convertJob = async function (job) {
errored
=
true
}
const
thumbFile
=
`
${
baseName
}
.jpg`
const
thumbPath
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFile
)
const
thumbFileSmall
=
`
${
baseName
}
-s.jpg`
const
thumbPathSmall
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFileSmall
)
const
thumbFileMedium
=
`
${
baseName
}
-m.jpg`
const
thumbPathMedium
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFileMedium
)
try
{
await
ffmpegThumb
(
destination
,
tmpDir
,
1
,
progress
=>
{
job
.
progress
(
60
+
progress
.
percent
*
0.3
)
})
const
thumbFile
=
`
${
baseName
}
.jpg`
const
thumbPath
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFile
)
await
image
.
convert
(
path
.
join
(
tmpDir
,
'
tn.png
'
),
thumbPath
)
const
thumbFileSmall
=
`
${
baseName
}
-s.jpg`
const
thumbPathSmall
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFileSmall
)
await
image
.
convert
(
path
.
join
(
tmpDir
,
'
tn.png
'
),
thumbPathSmall
,
{
resize
:
{
width
:
240
,
height
:
240
}})
const
thumbFileMedium
=
`
${
baseName
}
-m.jpg`
const
thumbPathMedium
=
path
.
join
(
path
.
dirname
(
destination
),
thumbFileMedium
)
await
image
.
convert
(
path
.
join
(
tmpDir
,
'
tn.png
'
),
thumbPathMedium
,
{
resize
:
{
width
:
640
,
height
:
640
}})
}
catch
(
e
)
{
...
...
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