public function handle($field, $input)
{
//
// can't process imaginary files (unless you're awesome)
//
if ($this->noAudioPathDefined($field, $input)) {
return;
}
//
// get the current settings we should use
//
$settings = $this->buildSettings($field, $input);
//
// need some way to determine if settings have changed since
// the last time we ran this b/c I don't want this to run
// every single time we save something on the video field,
// only when something has been changed we create a job
//
list($unprocessed, $duplicatedFormats) = $this->findUnprocessedFiles($field, $settings);
//
// update this fields's {format}_url
//
$this->updateVersionUrls($field, $unprocessed, $duplicatedFormats);
//
// only process videos that haven't been processed yet
//
if ($unprocessed) {
$this->Encoder->create($this->MediaPaths->zencoderUrl($field->values->original), $unprocessed);
$this->createTempHoldingFiles($unprocessed);
}
}