diff --git a/config/configuration.sample.yml b/config/configuration.sample.yml index 506da5fb94..fbc0f5f920 100644 --- a/config/configuration.sample.yml +++ b/config/configuration.sample.yml @@ -246,10 +246,7 @@ registration-fields: required: true download_async: enabled: true -pusher: - auth_key: 'pusher-auth_key' - secret: 'pusher-secret' - app_id: 'pusher-app_id' + xsendfile: enabled: false type: nginx @@ -395,6 +392,12 @@ externalservice: auth_key: 'pusher-auth_key' secret: 'pusher-secret' app_id: 'pusher-app_id' + happyscribe: + token: token + organization_id: 123456 + transcript_format: vtt + subdef_source: preview + user_account: deleting_policies: diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/SubtitleWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/SubtitleWorker.php index ddecac7087..8119f509a1 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Worker/SubtitleWorker.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/SubtitleWorker.php @@ -54,7 +54,7 @@ class SubtitleWorker implements WorkerInterface $happyscribeTranscriptFormat = $this->conf->get(['externalservice', 'happyscribe', 'transcript_format'], 'vtt'); if (!$organizationId || !$this->happyscribeToken ) { - $this->logger->error("External service Ginga not set correctly in configuration.yml"); + $this->logger->error("External service happyscribe not set correctly in configuration.yml"); return 0; } diff --git a/lib/classes/patch/418RC8PHRAS3777.php b/lib/classes/patch/418RC8PHRAS3777.php index 9f7fb7b5db..f5d649b596 100644 --- a/lib/classes/patch/418RC8PHRAS3777.php +++ b/lib/classes/patch/418RC8PHRAS3777.php @@ -76,6 +76,36 @@ class patch_418RC8PHRAS3777 implements patchInterface $conf->remove(['main', 'bridge']); } + // remove old pusher configuration + // copy it under externalservice + if ($conf->has(['pusher'])) { + $p = $conf->get(['pusher']); + $conf->set(['externalservice', 'pusher'], $p); + + $conf->remove(['pusher']); + } + + // if no pusher configuration + if (!$conf->has(['externalservice', 'pusher'])) { + $pusher = [ + 'auth_key' => 'pusher-auth_key', + 'secret' => 'pusher-secret', + 'app_id' => 'pusher-app_id' + ]; + $conf->set(['externalservice', 'pusher'], $pusher); + } + + // if no happyscribe configuration + if (!$conf->has(['externalservice', 'happyscribe'])) { + $h = [ + 'token' => 'token', + 'organization_id' => '123456', + 'transcript_format' => 'vtt', + 'subdef_source' => 'preview' + ]; + $conf->set(['externalservice', 'happyscribe'], $h); + } + // remove cooliris if ($conf->has(['crossdomain', 'allow-access-from'])) { $tValues = $conf->get(['crossdomain', 'allow-access-from']); diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index ce87fe5310..1b1ca35964 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -434,6 +434,11 @@ externalservice: auth_key: 'pusher-auth_key' secret: 'pusher-secret' app_id: 'pusher-app_id' + happyscribe: + token: token + organization_id: 123456 + transcript_format: vtt + subdef_source: preview Console_logger_enabled_environments: [test]