From 40f067148d50a4b6d3c7ac0b9a399892b901085d Mon Sep 17 00:00:00 2001 From: array-in-a-matrix Date: Mon, 13 Mar 2023 15:28:58 -0400 Subject: [PATCH 1/2] added dynamic thumbnails var --- roles/custom/matrix-dendrite/defaults/main.yml | 4 ++++ .../matrix-dendrite/templates/dendrite/dendrite.yaml.j2 | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/custom/matrix-dendrite/defaults/main.yml b/roles/custom/matrix-dendrite/defaults/main.yml index 8c2dded4..71532260 100644 --- a/roles/custom/matrix-dendrite/defaults/main.yml +++ b/roles/custom/matrix-dendrite/defaults/main.yml @@ -211,3 +211,7 @@ matrix_dendrite_userapi_auto_join_rooms: [] # statistics reporting configuration. These statistics contain the server # name, number of active users and some information on your deployment config. matrix_dendrite_report_stats: false + +# dynamically generate thumbnails for media content +matrix_dendrite_mediaapi_dynamic_thumbnails: false +matrix_dendrite_mediaapi_max_thumbnail_generators: 10 diff --git a/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 b/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 index 005f9bd6..e1d005b5 100644 --- a/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 +++ b/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 @@ -293,10 +293,10 @@ media_api: max_file_size_bytes: {{ matrix_dendrite_max_file_size_bytes|to_json }} # Whether to dynamically generate thumbnails if needed. - dynamic_thumbnails: false + dynamic_thumbnails: {{ matrix_dendrite_mediaapi_dynamic_thumbnails }} # The maximum number of simultaneous thumbnail generators to run. - max_thumbnail_generators: 10 + max_thumbnail_generators: {{ matrix_dendrite_mediaapi_max_thumbnails_generators }} # A list of thumbnail sizes to be generated for media content. thumbnail_sizes: From c93eb1dbf7333ae55cb216a1cd3f76f8dc37824f Mon Sep 17 00:00:00 2001 From: Array in a Matrix Date: Mon, 13 Mar 2023 16:19:49 -0400 Subject: [PATCH 2/2] Update dendrite.yaml.j2 --- .../matrix-dendrite/templates/dendrite/dendrite.yaml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 b/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 index e1d005b5..7098a5a1 100644 --- a/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 +++ b/roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 @@ -293,10 +293,10 @@ media_api: max_file_size_bytes: {{ matrix_dendrite_max_file_size_bytes|to_json }} # Whether to dynamically generate thumbnails if needed. - dynamic_thumbnails: {{ matrix_dendrite_mediaapi_dynamic_thumbnails }} + dynamic_thumbnails: {{ matrix_dendrite_mediaapi_dynamic_thumbnails|to_json }} # The maximum number of simultaneous thumbnail generators to run. - max_thumbnail_generators: {{ matrix_dendrite_mediaapi_max_thumbnails_generators }} + max_thumbnail_generators: {{ matrix_dendrite_mediaapi_max_thumbnails_generators|to_json }} # A list of thumbnail sizes to be generated for media content. thumbnail_sizes: