Add possibility to define the contactsheet file name with variables

This commit is contained in:
0xb00bface 2020-10-07 21:14:15 +02:00
parent cd394c8e36
commit 2d3bb0c5c8
2 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,7 @@
* Fix: Stripchat models with @ in their name were not recorded
* Fix: Camsoda browsing, the "New" tab is gone though. The information
is not available anymore
* You can now use variable to define the contactsheet file name
3.10.0
========================

View File

@ -58,7 +58,7 @@ public class CreateContactSheet extends AbstractPlaceholderAwarePostProcessor {
color},
new StringBuffer(), null).toString();
File executionDir = rec.getPostProcessedFile().isDirectory() ? rec.getPostProcessedFile() : rec.getPostProcessedFile().getParentFile();
File output = new File(executionDir, filename);
File output = new File(executionDir, fillInPlaceHolders(filename, rec, config));
File input = getInputFile(rec);
String[] args = {
@ -80,9 +80,10 @@ public class CreateContactSheet extends AbstractPlaceholderAwarePostProcessor {
};
String[] cmdline = OS.getFFmpegCommand(args);
LOG.info("Executing {} in working directory {}", Arrays.toString(cmdline), executionDir);
Process ffmpeg = Runtime.getRuntime().exec(cmdline, new String[0], executionDir);
Process ffmpeg = Runtime.getRuntime().exec(cmdline, OS.getEnvironment(), executionDir);
int exitCode = 1;
File ffmpegLog = File.createTempFile("create_contact_sheet_" + rec.getId() + '_', ".log");
ffmpegLog.deleteOnExit();
try (FileOutputStream mergeLogStream = new FileOutputStream(ffmpegLog)) {
Thread stdout = new Thread(new StreamRedirectThread(ffmpeg.getInputStream(), mergeLogStream));
Thread stderr = new Thread(new StreamRedirectThread(ffmpeg.getErrorStream(), mergeLogStream));