From 26a25532f57d44f3740d77ac321a4c8d205015c6 Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Tue, 15 Jan 2019 15:54:37 +0400 Subject: [PATCH 01/12] taken account config to retrieve token in header or in url --- lib/classes/API/OAuth2/Adapter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/classes/API/OAuth2/Adapter.php b/lib/classes/API/OAuth2/Adapter.php index c674aa277b..e64e258b1d 100644 --- a/lib/classes/API/OAuth2/Adapter.php +++ b/lib/classes/API/OAuth2/Adapter.php @@ -537,7 +537,9 @@ class API_OAuth2_Adapter extends OAuth2 public function verifyAccessToken($scope = null, $exit_not_present = true, $exit_invalid = true, $exit_expired = true, $exit_scope = true, $realm = null) { - $token_param = $this->getAccessTokenParams(); + $useTokenHeader = $this->app['conf']->get(['main', 'api_token_header']); + + $token_param = $this->getAccessTokenParams($useTokenHeader); // Access token was not provided if ($token_param === false) { From fd495e7966a2d30e0e858687716729ce3f521375 Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Tue, 15 Jan 2019 17:06:34 +0400 Subject: [PATCH 02/12] update configuration.sample.yml for api_token_header config --- config/configuration.sample.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/configuration.sample.yml b/config/configuration.sample.yml index 5ae54d2134..050b6562c1 100644 --- a/config/configuration.sample.yml +++ b/config/configuration.sample.yml @@ -7,6 +7,7 @@ main: languages: [] key: '' api_require_ssl: true + api_token_header: false database: host: 127.0.0.1 port: 3306 From cb490bc83d0466a97d67c99ab31e54888aa1a4c8 Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Wed, 16 Jan 2019 12:27:24 +0400 Subject: [PATCH 03/12] use const on call --- lib/classes/API/OAuth2/Adapter.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/classes/API/OAuth2/Adapter.php b/lib/classes/API/OAuth2/Adapter.php index e64e258b1d..4de6639d4d 100644 --- a/lib/classes/API/OAuth2/Adapter.php +++ b/lib/classes/API/OAuth2/Adapter.php @@ -537,7 +537,9 @@ class API_OAuth2_Adapter extends OAuth2 public function verifyAccessToken($scope = null, $exit_not_present = true, $exit_invalid = true, $exit_expired = true, $exit_scope = true, $realm = null) { - $useTokenHeader = $this->app['conf']->get(['main', 'api_token_header']); + $apiTokenHeader = $this->app['conf']->get(['main', 'api_token_header']); + + $useTokenHeader = $this->useTokenHeaderChoice($apiTokenHeader); $token_param = $this->getAccessTokenParams($useTokenHeader); @@ -810,4 +812,21 @@ class API_OAuth2_Adapter extends OAuth2 return false; } } + + /** + * Get the correct constante to call on Oauth2 + * + * @param $apiTokenHeader + * @return string + */ + private function useTokenHeaderChoice($apiTokenHeader) + { + if ($apiTokenHeader === true) { + return Oauth2::TOKEN_ONLY_IN_HEADER; + } elseif ($apiTokenHeader === false) { + return Oauth2::TOKEN_ONLY_IN_GETPOST; + } else { + return Oauth2::TOKEN_AUTO_FIND; + } + } } From 1e851113c8fac2cede66b59519ec55d975edd106 Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Thu, 17 Jan 2019 11:02:22 +0400 Subject: [PATCH 04/12] update alchemy/oauth2php in 4.1 --- composer.json | 2 +- composer.lock | 43 +++++++++++++++++-------------------------- 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/composer.json b/composer.json index bd39a204e7..98a77a6f1a 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "alchemy/embed-bundle": "^0.3.4", "alchemy/geonames-api-consumer": "~0.1.0", "alchemy/mediavorus": "^0.4.4", - "alchemy/oauth2php": "1.0.0", + "alchemy/oauth2php": "1.1.0", "alchemy/phlickr": "0.2.9", "alchemy/phpexiftool": "^0.7.0", "alchemy/rest-bundle": "^0.0.5", diff --git a/composer.lock b/composer.lock index 9745425f25..727a76d576 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "253990d4c81f9ae5f78c6c1221d6cf29", + "content-hash": "adf4074eb26ea80d414430d4f7b61311", "packages": [ { "name": "alchemy-fr/tcpdf-clone", @@ -337,16 +337,16 @@ }, { "name": "alchemy/oauth2php", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/alchemy-fr/oauth2-php.git", - "reference": "cb4fcb73e30ab54e0fb85a65b4d57147f7a0df15" + "reference": "fe5c19b417965110bad0981a6dfd2097b5ce4306" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/oauth2-php/zipball/cb4fcb73e30ab54e0fb85a65b4d57147f7a0df15", - "reference": "cb4fcb73e30ab54e0fb85a65b4d57147f7a0df15", + "url": "https://api.github.com/repos/alchemy-fr/oauth2-php/zipball/fe5c19b417965110bad0981a6dfd2097b5ce4306", + "reference": "fe5c19b417965110bad0981a6dfd2097b5ce4306", "shasum": "" }, "type": "library", @@ -356,7 +356,7 @@ ] }, "notification-url": "https://packagist.org/downloads/", - "time": "2013-07-01T09:46:59+00:00" + "time": "2019-01-16T16:10:46+00:00" }, { "name": "alchemy/phlickr", @@ -1898,12 +1898,12 @@ "version": "v2.5.6", "source": { "type": "git", - "url": "https://github.com/doctrine/doctrine2.git", + "url": "https://github.com/doctrine/orm.git", "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/e6c434196c8ef058239aaa0724b4aadb0107940b", + "url": "https://api.github.com/repos/doctrine/orm/zipball/e6c434196c8ef058239aaa0724b4aadb0107940b", "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b", "shasum": "" }, @@ -2304,12 +2304,12 @@ "version": "v2.2.1", "source": { "type": "git", - "url": "https://github.com/google/google-api-php-client.git", + "url": "https://github.com/googleapis/google-api-php-client.git", "reference": "b69b8ac4bf6501793c389d4e013a79d09c85c5f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-api-php-client/zipball/b69b8ac4bf6501793c389d4e013a79d09c85c5f2", + "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/b69b8ac4bf6501793c389d4e013a79d09c85c5f2", "reference": "b69b8ac4bf6501793c389d4e013a79d09c85c5f2", "shasum": "" }, @@ -2363,12 +2363,12 @@ "version": "v0.36", "source": { "type": "git", - "url": "https://github.com/google/google-api-php-client-services.git", + "url": "https://github.com/googleapis/google-api-php-client-services.git", "reference": "2fd7d2876fbc0174faddba3241956a1393536159" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/2fd7d2876fbc0174faddba3241956a1393536159", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/2fd7d2876fbc0174faddba3241956a1393536159", "reference": "2fd7d2876fbc0174faddba3241956a1393536159", "shasum": "" }, @@ -2400,12 +2400,12 @@ "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/google/google-auth-library-php.git", + "url": "https://github.com/googleapis/google-auth-library-php.git", "reference": "548d27d670f0236dc5258fa4cdde6e7b63464cfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-auth-library-php/zipball/548d27d670f0236dc5258fa4cdde6e7b63464cfd", + "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/548d27d670f0236dc5258fa4cdde6e7b63464cfd", "reference": "548d27d670f0236dc5258fa4cdde6e7b63464cfd", "shasum": "" }, @@ -5766,17 +5766,6 @@ { "name": "roave/security-advisories", "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "3db4b0df21d1f527304650e717c66af48981f1c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/3db4b0df21d1f527304650e717c66af48981f1c4", - "reference": "3db4b0df21d1f527304650e717c66af48981f1c4", - "shasum": "" - }, "conflict": { "adodb/adodb-php": "<5.20.6", "amphp/artax": ">=2,<2.0.4|>0.7.1,<1.0.4", @@ -6015,6 +6004,7 @@ "keywords": [ "microframework" ], + "abandoned": "symfony/flex", "time": "2016-01-06T14:59:35+00:00" }, { @@ -6060,6 +6050,7 @@ ], "description": "A WebProfiler for Silex", "homepage": "http://silex.sensiolabs.org/", + "abandoned": true, "time": "2016-01-10T11:39:13+00:00" }, { From 9976ebee6f8dfd304bd39738a8807a94bc0a7934 Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Thu, 17 Jan 2019 19:02:00 +0400 Subject: [PATCH 05/12] update composer.lock --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 727a76d576..9d00d30e67 100644 --- a/composer.lock +++ b/composer.lock @@ -341,12 +341,12 @@ "source": { "type": "git", "url": "https://github.com/alchemy-fr/oauth2-php.git", - "reference": "fe5c19b417965110bad0981a6dfd2097b5ce4306" + "reference": "801510972240555fa182813851efd96659d37a68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/oauth2-php/zipball/fe5c19b417965110bad0981a6dfd2097b5ce4306", - "reference": "fe5c19b417965110bad0981a6dfd2097b5ce4306", + "url": "https://api.github.com/repos/alchemy-fr/oauth2-php/zipball/801510972240555fa182813851efd96659d37a68", + "reference": "801510972240555fa182813851efd96659d37a68", "shasum": "" }, "type": "library", @@ -356,7 +356,7 @@ ] }, "notification-url": "https://packagist.org/downloads/", - "time": "2019-01-16T16:10:46+00:00" + "time": "2019-01-17T14:34:10+00:00" }, { "name": "alchemy/phlickr", From 8799bfb99ae2fcd6ec4a8299b8b2cd59aacdc7a3 Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Tue, 22 Jan 2019 16:36:48 +0400 Subject: [PATCH 06/12] update alchemy/mediavorus --- composer.lock | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/composer.lock b/composer.lock index 9745425f25..fafac96e4e 100644 --- a/composer.lock +++ b/composer.lock @@ -1,7 +1,7 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], "content-hash": "253990d4c81f9ae5f78c6c1221d6cf29", @@ -275,16 +275,16 @@ }, { "name": "alchemy/mediavorus", - "version": "0.4.8", + "version": "0.4.9", "source": { "type": "git", "url": "https://github.com/alchemy-fr/MediaVorus.git", - "reference": "6a50c397211dfdf6da108ea1ebc7527c37419ab7" + "reference": "1a96dc4142ff8474c11285cab9eab11df9683255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/MediaVorus/zipball/6a50c397211dfdf6da108ea1ebc7527c37419ab7", - "reference": "6a50c397211dfdf6da108ea1ebc7527c37419ab7", + "url": "https://api.github.com/repos/alchemy-fr/MediaVorus/zipball/1a96dc4142ff8474c11285cab9eab11df9683255", + "reference": "1a96dc4142ff8474c11285cab9eab11df9683255", "shasum": "" }, "require": { @@ -333,7 +333,7 @@ "keywords": [ "metadata" ], - "time": "2018-05-03T14:17:10+00:00" + "time": "2019-01-22T11:23:34+00:00" }, { "name": "alchemy/oauth2php", @@ -1898,12 +1898,12 @@ "version": "v2.5.6", "source": { "type": "git", - "url": "https://github.com/doctrine/doctrine2.git", + "url": "https://github.com/doctrine/orm.git", "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/e6c434196c8ef058239aaa0724b4aadb0107940b", + "url": "https://api.github.com/repos/doctrine/orm/zipball/e6c434196c8ef058239aaa0724b4aadb0107940b", "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b", "shasum": "" }, @@ -2304,12 +2304,12 @@ "version": "v2.2.1", "source": { "type": "git", - "url": "https://github.com/google/google-api-php-client.git", + "url": "https://github.com/googleapis/google-api-php-client.git", "reference": "b69b8ac4bf6501793c389d4e013a79d09c85c5f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-api-php-client/zipball/b69b8ac4bf6501793c389d4e013a79d09c85c5f2", + "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/b69b8ac4bf6501793c389d4e013a79d09c85c5f2", "reference": "b69b8ac4bf6501793c389d4e013a79d09c85c5f2", "shasum": "" }, @@ -2363,12 +2363,12 @@ "version": "v0.36", "source": { "type": "git", - "url": "https://github.com/google/google-api-php-client-services.git", + "url": "https://github.com/googleapis/google-api-php-client-services.git", "reference": "2fd7d2876fbc0174faddba3241956a1393536159" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/2fd7d2876fbc0174faddba3241956a1393536159", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/2fd7d2876fbc0174faddba3241956a1393536159", "reference": "2fd7d2876fbc0174faddba3241956a1393536159", "shasum": "" }, @@ -2400,12 +2400,12 @@ "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/google/google-auth-library-php.git", + "url": "https://github.com/googleapis/google-auth-library-php.git", "reference": "548d27d670f0236dc5258fa4cdde6e7b63464cfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-auth-library-php/zipball/548d27d670f0236dc5258fa4cdde6e7b63464cfd", + "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/548d27d670f0236dc5258fa4cdde6e7b63464cfd", "reference": "548d27d670f0236dc5258fa4cdde6e7b63464cfd", "shasum": "" }, @@ -5766,17 +5766,6 @@ { "name": "roave/security-advisories", "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "3db4b0df21d1f527304650e717c66af48981f1c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/3db4b0df21d1f527304650e717c66af48981f1c4", - "reference": "3db4b0df21d1f527304650e717c66af48981f1c4", - "shasum": "" - }, "conflict": { "adodb/adodb-php": "<5.20.6", "amphp/artax": ">=2,<2.0.4|>0.7.1,<1.0.4", @@ -6015,6 +6004,7 @@ "keywords": [ "microframework" ], + "abandoned": "symfony/flex", "time": "2016-01-06T14:59:35+00:00" }, { @@ -6060,6 +6050,7 @@ ], "description": "A WebProfiler for Silex", "homepage": "http://silex.sensiolabs.org/", + "abandoned": true, "time": "2016-01-10T11:39:13+00:00" }, { From a656aa007246d8b50e7413dc60e294b5a513e64d Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Thu, 24 Jan 2019 18:03:03 +0400 Subject: [PATCH 07/12] audio subdeffrom video --- .../Controller/Admin/SubdefsController.php | 11 +++++++++- .../Phrasea/Filesystem/FilesystemService.php | 2 ++ lib/Alchemy/Phrasea/Media/Subdef/Audio.php | 20 ++++++++++++++++++- lib/classes/databox/subdef.php | 6 +++++- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php b/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php index 6b938cb569..a0adaba9ac 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php @@ -145,6 +145,7 @@ class SubdefsController extends Controller $options[Audio::OPTION_AUDIOBITRATE] = $config["audio"]["definitions"][$preset][Audio::OPTION_AUDIOBITRATE]; $options[Audio::OPTION_AUDIOSAMPLERATE] = $config["audio"]["definitions"][$preset][Audio::OPTION_AUDIOSAMPLERATE]; $options[Audio::OPTION_ACODEC] = $config["audio"]["definitions"][$preset][Audio::OPTION_ACODEC]; + $options[Audio::OPTION_AUDIOCHANNEL] = $config["audio"]["definitions"][$preset][Audio::OPTION_AUDIOCHANNEL]; foreach ($config["audio"]["definitions"][$preset][Subdef::OPTION_DEVICE] as $devices) { $options[Subdef::OPTION_DEVICE][] = $devices; } @@ -211,7 +212,7 @@ class SubdefsController extends Controller { $mapping = [ Type::TYPE_IMAGE => [Subdef::TYPE_IMAGE, Subdef::TYPE_PDF], - Type::TYPE_VIDEO => [Subdef::TYPE_IMAGE, Subdef::TYPE_VIDEO, Subdef::TYPE_ANIMATION], + Type::TYPE_VIDEO => [Subdef::TYPE_IMAGE, Subdef::TYPE_VIDEO, Subdef::TYPE_ANIMATION, Subdef::TYPE_AUDIO], Type::TYPE_AUDIO => [Subdef::TYPE_IMAGE, Subdef::TYPE_AUDIO], Type::TYPE_DOCUMENT => [Subdef::TYPE_IMAGE, Subdef::TYPE_FLEXPAPER, Subdef::TYPE_PDF], Type::TYPE_FLASH => [Subdef::TYPE_IMAGE] @@ -543,11 +544,19 @@ class SubdefsController extends Controller Audio::OPTION_ACODEC => "libmp3lame", Subdef::OPTION_DEVICE => ["all"] ], + "Wave Mono 256 kbit/s" => [ + Audio::OPTION_AUDIOBITRATE => "256", + Audio::OPTION_AUDIOSAMPLERATE => "16000", + Audio::OPTION_ACODEC => "pcm_s16le", + Audio::OPTION_AUDIOCHANNEL => "mono", + Subdef::OPTION_DEVICE => ["all"] + ], ], "form" => [ Audio::OPTION_AUDIOBITRATE => "slide", Audio::OPTION_AUDIOSAMPLERATE => "select", Audio::OPTION_ACODEC => "select", + Audio::OPTION_AUDIOCHANNEL => "select", Subdef::OPTION_DEVICE => "checkbox", ], ], diff --git a/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php b/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php index fe2ac305c9..8da30984f0 100644 --- a/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php +++ b/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php @@ -201,6 +201,8 @@ class FilesystemService return 'ogg'; case 'libmp3lame': return 'mp3'; + case 'pcm_s16le': + return 'wav'; } return null; diff --git a/lib/Alchemy/Phrasea/Media/Subdef/Audio.php b/lib/Alchemy/Phrasea/Media/Subdef/Audio.php index ac50940dc1..2551669dd1 100644 --- a/lib/Alchemy/Phrasea/Media/Subdef/Audio.php +++ b/lib/Alchemy/Phrasea/Media/Subdef/Audio.php @@ -19,6 +19,7 @@ class Audio extends Provider const OPTION_THREADS = 'threads'; const OPTION_ACODEC = 'acodec'; const OPTION_AUDIOSAMPLERATE = 'audiosamplerate'; + const OPTION_AUDIOCHANNEL = 'audiochannel'; public function __construct(TranslatorInterface $translator) { @@ -29,9 +30,12 @@ class Audio extends Provider 47250, 48000, 50000, 50400, 88200, 96000 ]; + $audioChannel = ['mono', 'stereo']; + $this->registerOption(new OptionType\Range($this->translator->trans('Audio Birate'), self::OPTION_AUDIOBITRATE, 32, 320, 128, 32)); $this->registerOption(new OptionType\Enum($this->translator->trans('AudioSamplerate'), self::OPTION_AUDIOSAMPLERATE, $AVaudiosamplerate)); - $this->registerOption(new OptionType\Enum($this->translator->trans('Audio Codec'), self::OPTION_ACODEC, ['libmp3lame', 'flac'], 'libmp3lame')); + $this->registerOption(new OptionType\Enum($this->translator->trans('Audio Codec'), self::OPTION_ACODEC, ['libmp3lame', 'flac', 'pcm_s16le'], 'libmp3lame')); + $this->registerOption(new OptionType\Enum($this->translator->trans('Audio channel'), self::OPTION_AUDIOCHANNEL, $audioChannel)); } public function getType() @@ -53,7 +57,21 @@ class Audio extends Provider $this->spec->setAudioCodec($this->getOption(self::OPTION_ACODEC)->getValue()); $this->spec->setAudioSampleRate($this->getOption(self::OPTION_AUDIOSAMPLERATE)->getValue()); $this->spec->setAudioKiloBitrate($this->getOption(self::OPTION_AUDIOBITRATE)->getValue()); + $this->spec->setAudioChannels($this->getChannelNumber($this->getOption(self::OPTION_AUDIOCHANNEL)->getValue())); return $this->spec; } + + private function getChannelNumber($audioChannel) + { + switch($audioChannel) + { + case 'mono': + return 1; + case 'stereo': + return 2; + default: + return null; + } + } } diff --git a/lib/classes/databox/subdef.php b/lib/classes/databox/subdef.php index 0dcab4ccc1..f1a269d731 100644 --- a/lib/classes/databox/subdef.php +++ b/lib/classes/databox/subdef.php @@ -44,7 +44,7 @@ class databox_subdef SubdefType::TYPE_DOCUMENT => [SubdefSpecs::TYPE_IMAGE, SubdefSpecs::TYPE_FLEXPAPER, SubdefSpecs::TYPE_PDF], SubdefType::TYPE_FLASH => [SubdefSpecs::TYPE_IMAGE], SubdefType::TYPE_IMAGE => [SubdefSpecs::TYPE_IMAGE, SubdefSpecs::TYPE_PDF], - SubdefType::TYPE_VIDEO => [SubdefSpecs::TYPE_IMAGE, SubdefSpecs::TYPE_VIDEO, SubdefSpecs::TYPE_ANIMATION], + SubdefType::TYPE_VIDEO => [SubdefSpecs::TYPE_IMAGE, SubdefSpecs::TYPE_VIDEO, SubdefSpecs::TYPE_ANIMATION, SubdefSpecs::TYPE_AUDIO], SubdefType::TYPE_UNKNOWN => [SubdefSpecs::TYPE_IMAGE], ]; const CLASS_THUMBNAIL = 'thumbnail'; @@ -156,6 +156,10 @@ class databox_subdef if ($sd->audiosamplerate) { $audio->setOptionValue(Audio::OPTION_AUDIOSAMPLERATE, (int) $sd->audiosamplerate); } + if ($sd->audiochannel) { + $audio->setOptionValue(Audio::OPTION_AUDIOCHANNEL, (string) $sd->audiochannel); + } + return $audio; } /** From 9e7e9fe284a7bea7bdf74ccf339a735b104bb0ef Mon Sep 17 00:00:00 2001 From: Nicolas Maillat Date: Fri, 25 Jan 2019 10:58:20 +0100 Subject: [PATCH 08/12] PHRAS-2410 disable pear.php.net in master --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6ab1d246b2..76f7c42a12 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,7 +37,8 @@ jobs: - run: git clone https://github.com/alanxz/rabbitmq-c - run: cd rabbitmq-c && git checkout 2ca1774489328cde71195f5fa95e17cf3a80cb8a - run: cd rabbitmq-c && git submodule init && git submodule update && autoreconf -i && ./configure && make && sudo make install - - run: pecl channel-update pear.php.net + # disabled because pear.php.net is down cause of security failure + #- run: pecl channel-update pear.php.net - run: yes '' | pecl install amqp-1.9.3 - run: yes '' | pecl install imagick - run: sudo apt-get install libzmq-dev From 30649b0db541ad2ee6d4facaacbc6787ac15926e Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Fri, 25 Jan 2019 16:32:10 +0400 Subject: [PATCH 09/12] update lib media-alchemyst to 0.5.2 --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 80ccaa0827..be28149a9e 100644 --- a/composer.lock +++ b/composer.lock @@ -4334,16 +4334,16 @@ }, { "name": "media-alchemyst/media-alchemyst", - "version": "0.5.1", + "version": "0.5.2", "source": { "type": "git", "url": "https://github.com/alchemy-fr/Media-Alchemyst.git", - "reference": "b82bb891640cb1ce5d5523235047c34c64194514" + "reference": "5d2fe6dd95215804202ecf0466fd9cfaeedd0140" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/Media-Alchemyst/zipball/b82bb891640cb1ce5d5523235047c34c64194514", - "reference": "b82bb891640cb1ce5d5523235047c34c64194514", + "url": "https://api.github.com/repos/alchemy-fr/Media-Alchemyst/zipball/5d2fe6dd95215804202ecf0466fd9cfaeedd0140", + "reference": "5d2fe6dd95215804202ecf0466fd9cfaeedd0140", "shasum": "" }, "require": { @@ -4404,7 +4404,7 @@ "video", "video processing" ], - "time": "2016-03-16T13:11:52+00:00" + "time": "2019-01-25T12:09:11+00:00" }, { "name": "monolog/monolog", From 605e6b031ae0a49af19b32ca2c31bedb480603e0 Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Tue, 29 Jan 2019 16:54:18 +0400 Subject: [PATCH 10/12] fix presets audio name --- .../Controller/Admin/SubdefsController.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php b/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php index a0adaba9ac..e30aa03946 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php @@ -526,31 +526,38 @@ class SubdefsController extends Controller ], Subdef::TYPE_AUDIO => [ "definitions" => [ - "Low AAC 96 kbit/s" => [ + "Low MP3 96 kbit/s" => [ Audio::OPTION_AUDIOBITRATE => "100", Audio::OPTION_AUDIOSAMPLERATE => "8000", Audio::OPTION_ACODEC => "libmp3lame", Subdef::OPTION_DEVICE => ["all"] ], - "Normal AAC 128 kbit/s" => [ + "Normal MP3 128 kbit/s" => [ Audio::OPTION_AUDIOBITRATE => "180", Audio::OPTION_AUDIOSAMPLERATE => "44100", Audio::OPTION_ACODEC => "libmp3lame", Subdef::OPTION_DEVICE => ["all"] ], - "High AAC 320 kbit/s" => [ + "High MP3 320 kbit/s" => [ Audio::OPTION_AUDIOBITRATE => "230", Audio::OPTION_AUDIOSAMPLERATE => "50000", Audio::OPTION_ACODEC => "libmp3lame", Subdef::OPTION_DEVICE => ["all"] ], - "Wave Mono 256 kbit/s" => [ + "Wave Mono 16 kHz" => [ Audio::OPTION_AUDIOBITRATE => "256", Audio::OPTION_AUDIOSAMPLERATE => "16000", Audio::OPTION_ACODEC => "pcm_s16le", Audio::OPTION_AUDIOCHANNEL => "mono", Subdef::OPTION_DEVICE => ["all"] ], + "Wave Mono 8 kHz" => [ + Audio::OPTION_AUDIOBITRATE => "128", + Audio::OPTION_AUDIOSAMPLERATE => "8000", + Audio::OPTION_ACODEC => "pcm_s16le", + Audio::OPTION_AUDIOCHANNEL => "mono", + Subdef::OPTION_DEVICE => ["all"] + ], ], "form" => [ Audio::OPTION_AUDIOBITRATE => "slide", From 0010340d879c391400ccb925fdb238ecd82d3e4c Mon Sep 17 00:00:00 2001 From: Nicolas Maillat Date: Fri, 1 Feb 2019 17:01:21 +0100 Subject: [PATCH 11/12] Update Authors In 4.1 PHRAS-2397 --- AUTHORS | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/AUTHORS b/AUTHORS index d749eb8fcf..759fbbde75 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,28 +1,40 @@ ** Phraseanet is written and maintained by the Phraseanet Developer Team ** - Benoît Burnichon - Jean-Yves Gaulier - Andrey Kalinovsky - Nicolas Legoff - Romain Neutron + - Jean-Yves Gaulier + - Milos M + - Mike NG + - Xavier Rousset + - Aina Sitraka + - Filip Vilic + ** Proudly Powered by Alchemy ** - Nicolas Amendola - Nathanaël Attar - Aurélie Bachelet - Anthony Cabot - Moctar Diouf - Jennifer Guérin - Nicolas Honoré - Nicolas Maillat - Guillaume Maubert - Jonathan Schneider + - Aurélie Bachelet + - Laetitia Bianchi + - Anthony Cabot + - Moctar Diouf + - Jennifer Guérin + - Félix Noir + - Nicolas Maillat + - Guillaume Maubert + ** They gave some love to Phraseanet ** - Ysoline Gresille + - Nicolas Amendola + - Nathanaël Attar + - Florian Blouet + - Benoît Burnichon + - Thibaud Fabre + - Ysoline Gresille + - Nicolas Honoré + - Andrey Kalinovsky + - Nicolas Legoff + - Romain Neutron + - Jonathan Schneider + Phraseanet c/o Alchemy 30 Place Saint Georges 75009 Paris - France From 3d13616e7810edb660dc6dfbaab1c4bce767536d Mon Sep 17 00:00:00 2001 From: Nicolas Maillat Date: Fri, 1 Feb 2019 17:37:22 +0100 Subject: [PATCH 12/12] Update Contributors PHRAS_2397 Update Contributors in Master --- CONTRIBUTORS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 4c9772eaed..794f49dee1 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1,3 +1,7 @@ +#version 4.0 + - Krzysztof Szulski Security + - Ideepix Docker Deploiement + #version 3.7 - Pieter Demonie (Dutch localization)