'use strict';

// Load libraries
const logger = require('../../log');

// On conversion completion
module.exports = function(stdout, stderr, job) {

  // Set the progress bar to 100%
  this.progressBar.update(1);

  // Close progress bar
  this.progressBar.terminate();

  // DEBUG
  logger.info('Complete');

};

@@ -8,16 +8,136 @@
 rict';%0A%0A
+// Load requirements%0Aconst moment = require('moment'),%0A      fs = require('fs'),%0A      filesize = require('filesize');%0A%0A
 // Load 
@@ -261,173 +261,1101 @@
  job
-) %7B%0A%0A  // Set the progress bar to 100%25%0A  this.progressBar.update(1);%0A%0A  // Close progress bar%0A  this.progressBar.terminate();%0A%0A  // DEBUG%0A  logger.info('Complete');%0A
+, metadata, resolve, reject) %7B%0A%0A  // Calculate new filesize and duration%0A  let size = fs.statSync(job.temp).size,%0A      elapsed = moment.duration(moment().diff(this.started), 'milliseconds');%0A%0A  // Set the progress bar to 100%25%0A  this.progressBar.update(1);%0A%0A  // Close progress bar%0A  this.progressBar.terminate();%0A%0A  // Update task with completed data%0A  job.progress.taken = elapsed.format('mm:ss', %7Btrim: false, forceLength: true%7D);%0A  job.size.current = %7Braw: size, formatted: filesize(size)%7D;%0A  job.size.difference = %7B%0A    raw: ( job.size.original.raw - job.size.current.raw ),%0A    formatted: filesize( job.size.original.raw - job.size.current.raw ),%0A  %7D;%0A%0A  // Calculate savings%0A  job.size.difference.percent = ( ( job.size.difference.raw / job.size.original.raw ) * 100 );%0A%0A  // DEBUG%0A  logger.info('Conversion complete in %25s.', job.progress.taken);%0A%0A  // Stats%0A  logger.info(%0A    lang('INFO.COMPLETE'),%0A    job.size.original.formatted,%0A    job.size.current.formatted,%0A    job.size.difference.formatted,%0A    job.size.difference.percent.toFixed(2)%0A  );%0A%0A  // All done%0A  return resolve(job);
 %0A%7D;%0A

Add more data and resolve to conversion end event