diff --git a/.travis.yml b/.travis.yml index ee67398..abcd67d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ cache: - "$HOME/.npm" php: - - 7.2 + - 7.3 branches: only: @@ -22,8 +22,18 @@ env: global: - PATH="$PATH:$HOME/.composer/vendor/bin" +matrix: + include: + - env: DRUPAL_TESTING_DRUPAL_VERSION=~8.8.0 + php: 7.2 + - env: DRUPAL_TESTING_DRUPAL_VERSION=~8.8.0 + before_install: - - composer global require thunder/travis + - composer global require thunder/drupal-testing + +before_script: + - phpenv config-rm xdebug.ini + script: - test-drupal-project diff --git a/config/install/nexx_integration.settings.yml b/config/install/nexx_integration.settings.yml index 16e2b34..c5604b4 100644 --- a/config/install/nexx_integration.settings.yml +++ b/config/install/nexx_integration.settings.yml @@ -3,3 +3,5 @@ nexx_api_url: 'https://api.nexx.cloud/hooks/thunder.omnia' nexx_api_authkey: '' omnia_id: 0 notification_access_key: '' +api_secret: '' +bigger_thumbnail: false diff --git a/config/schema/nexx_integration.schema.yml b/config/schema/nexx_integration.schema.yml index 46da2f5..bbe2537 100644 --- a/config/schema/nexx_integration.schema.yml +++ b/config/schema/nexx_integration.schema.yml @@ -17,6 +17,12 @@ nexx_integration.settings: notification_access_key: type: string label: 'NEXX notification access key.' + api_secret: + type: string + label: 'NEXX notification API secret.' + bigger_thumbnail: + type: boolean + label: 'Allow bigger thumbnail' media.source.nexx_video: type: media.source.field_aware diff --git a/nexx_integration.module b/nexx_integration.module index 09b5b9f..07ae199 100644 --- a/nexx_integration.module +++ b/nexx_integration.module @@ -269,11 +269,12 @@ function nexx_integration_cron() { $ids = $storage->getQuery() ->condition($video_field . '.validfrom_ssc', \Drupal::time()->getRequestTime(), '<=') ->condition($video_field . '.validto_ssc', \Drupal::time()->getRequestTime(), '>') - ->condition("status", FALSE) + ->condition("status", 0) ->execute(); foreach ($storage->loadMultiple($ids) as $video) { - $video->set("status", TRUE); + /** @var \Drupal\media\MediaInterface $video */ + $video->setPublished(); $video->save(); $logger->info("Published nexx video \"@videoname\" (id: @id)", [ '@videoname' => $video->label(), @@ -286,12 +287,12 @@ function nexx_integration_cron() { $ids = $storage->getQuery() ->condition($video_field . '.validto_ssc', 0, '<>') ->condition($video_field . '.validto_ssc', \Drupal::time()->getRequestTime(), '<=') - ->condition("status", TRUE) + ->condition("status", 1) ->execute(); foreach ($storage->loadMultiple($ids) as $video) { /** @var \Drupal\media\MediaInterface $video */ - $video->set("status", FALSE); + $video->setUnpublished(); $video->save(); $logger->info("Unpublished nexx video \"@videoname\" (id: @id)", [ '@videoname' => $video->label(),