diff --git a/app/php/import_progress.php b/app/php/import_progress.php index 2bcace5..c3582c9 100755 --- a/app/php/import_progress.php +++ b/app/php/import_progress.php @@ -34,3 +34,4 @@ header('Status: 400 Bad Request'); log_file($err, $config); } + diff --git a/app/php/include/apiutils.php b/app/php/include/apiutils.php index ba7454d..22b52b1 100644 --- a/app/php/include/apiutils.php +++ b/app/php/include/apiutils.php @@ -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 @@ -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); diff --git a/app/php/include/authutils.php b/app/php/include/authutils.php index cfde204..7d3401e 100644 --- a/app/php/include/authutils.php +++ b/app/php/include/authutils.php @@ -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; } } diff --git a/app/php/include/httputils.php b/app/php/include/httputils.php index ef0c8fd..38249b2 100644 --- a/app/php/include/httputils.php +++ b/app/php/include/httputils.php @@ -93,3 +93,4 @@ function http_set_options($ch, $options = array(), $headers = array()) { } } } +