Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
Fix adds duration back to complete callback request
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Anarino committed Mar 5, 2015
1 parent 41d5e2b commit 7dd49de
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/php/import_progress.php
Expand Up @@ -34,3 +34,4 @@
header('Status: 400 Bad Request');
log_file($err, $config);
}

2 changes: 1 addition & 1 deletion app/php/include/apiutils.php
Expand Up @@ -250,7 +250,6 @@ function api_job_import($input = array(), $output = array(), $config = array())
if (! ($id && $extension && $type)) $err = 'Required parameter omitted';
}
if (! $err) { // create job for transcoder
if ('image' != $type) $complete_callback_payload['duration'] = '{job.duration}';
$input_tag = array('type' => $type);
if ($type != 'audio') $input_tag['fill'] = 'none';
// DESTINATION
Expand All @@ -273,6 +272,7 @@ function api_job_import($input = array(), $output = array(), $config = array())
'no_audio' => '{job.inputs.0.no_audio}',
'no_video' => '{job.inputs.0.no_video}',
);
if ('image' != $type) $complete_callback_payload['duration'] = '{job.duration}';
if (! empty($output['include_progress'])) $result['callbacks'][] = service_import_progress_callback($progress_callback_payload, $config);
$result['callbacks'][] = service_import_complete_callback($complete_callback_payload, $config);
$input_tag['source'] = service_source($input, $config);
Expand Down
2 changes: 1 addition & 1 deletion app/php/include/authutils.php
Expand Up @@ -57,7 +57,7 @@ function auth_userid() {
function auth_ok_callback($config = array()) {
$ok = FALSE;
if (! $config) $config = config_get();
if (! config_error($config)) $ok = auth_ok();
if (! config_error($config)) $ok = auth_ok($config);
return $ok;
}
}
Expand Down
1 change: 1 addition & 0 deletions app/php/include/httputils.php
Expand Up @@ -93,3 +93,4 @@ function http_set_options($ch, $options = array(), $headers = array()) {
}
}
}

0 comments on commit 7dd49de

Please sign in to comment.