Made custom command line arguments respect placeholders like %FPS%

This commit is contained in:
CrushedPixel
2015-07-02 13:25:29 +02:00
parent d5007692de
commit e1c19d7537
4 changed files with 15 additions and 9 deletions

View File

@@ -59,18 +59,12 @@ public class VideoWriter {
File folder = ReplayFileIO.getRenderFolder();
String fileName = FILE_FORMAT.format(Calendar.getInstance().getTime());
final String args;
if(options.getCommandLineArguments() != null) {
args = options.getCommandLineArguments();
} else {
args = options.getExportCommandArgs()
final String args = options.getExportCommandArgs()
.replace("%WIDTH%", String.valueOf(options.getWidth()))
.replace("%HEIGHT%", String.valueOf(options.getHeight()))
.replace("%FPS%", String.valueOf(options.getFps()))
.replace("%FILENAME%", fileName)
.replace("%BITRATE%", options.getBitrate());
}
List<String> command = new ArrayList<String>();
command.add(options.getExportCommand());