From 0e0c446579cfee9b5230daecf0094b87fa237297 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 6 May 2024 22:19:35 -0400 Subject: [PATCH 01/14] Update comrak to include: https://github.com/philomena-dev/comrak/pull/1 https://github.com/philomena-dev/comrak/pull/2 by @Meow --- native/philomena/Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/philomena/Cargo.lock b/native/philomena/Cargo.lock index 2612ec9c..1c6c6b60 100644 --- a/native/philomena/Cargo.lock +++ b/native/philomena/Cargo.lock @@ -43,8 +43,8 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "comrak" -version = "0.22.0" -source = "git+https://github.com/philomena-dev/comrak?branch=main#a27d6b6487d94e040e5cdb70733d3a59cba5bab0" +version = "0.23.0" +source = "git+https://github.com/philomena-dev/comrak?branch=main#4c7cd1a1aa2db546ff253b69950d01e8f8aebd3a" dependencies = [ "derive_builder", "entities", From d76be72a5de0969e01bde4bd0743c4a3e3cab144 Mon Sep 17 00:00:00 2001 From: mdashlw Date: Sat, 11 May 2024 19:04:52 +0300 Subject: [PATCH 02/14] feat(thumbnailer): purge cache for file when handling :replace_original from processors (#256) --- lib/philomena/images/thumbnailer.ex | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/philomena/images/thumbnailer.ex b/lib/philomena/images/thumbnailer.ex index dd7240e1..d6d5cc8e 100644 --- a/lib/philomena/images/thumbnailer.ex +++ b/lib/philomena/images/thumbnailer.ex @@ -5,6 +5,7 @@ defmodule Philomena.Images.Thumbnailer do alias Philomena.DuplicateReports alias Philomena.ImageIntensities + alias Philomena.ImagePurgeWorker alias Philomena.Images.Image alias Philomena.Processors alias Philomena.Analyzers @@ -103,8 +104,14 @@ defmodule Philomena.Images.Thumbnailer do defp apply_change(image, {:intensities, intensities}), do: ImageIntensities.create_image_intensity(image, intensities) - defp apply_change(image, {:replace_original, new_file}), - do: upload_file(image, new_file, "full.#{image.image_format}") + defp apply_change(image, {:replace_original, new_file}) do + full = "full.#{image.image_format}" + upload_file(image, new_file, full) + + Exq.enqueue(Exq, "indexing", ImagePurgeWorker, [ + Path.join(image_url_base(image, nil), full) + ]) + end defp apply_change(image, {:thumbnails, thumbnails}), do: Enum.map(thumbnails, &apply_thumbnail(image, &1)) From 7592b0f4d990d81f78ac5c92ac7dd233bddc67a2 Mon Sep 17 00:00:00 2001 From: liamwhite Date: Mon, 13 May 2024 19:47:37 -0400 Subject: [PATCH 03/14] Hide Elixir dependencies from host (#257) --- docker-compose.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 8e644165..a5034ca0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,10 @@ version: '3' volumes: postgres_data: {} elastic_data: {} + app_cargo_data: {} + app_build_data: {} + app_deps_data: {} + app_native_data: {} services: app: @@ -44,6 +48,10 @@ services: tty: true volumes: - .:/srv/philomena + - app_cargo_data:/srv/philomena/.cargo + - app_build_data:/srv/philomena/_build + - app_deps_data:/srv/philomena/deps + - app_native_data:/srv/philomena/priv/native depends_on: - postgres - elasticsearch From 65da36369d03561f75dba9f179b6696b6278329d Mon Sep 17 00:00:00 2001 From: Eliot Partridge Date: Tue, 14 May 2024 21:32:45 -0400 Subject: [PATCH 04/14] Pause spoilered videos on image pages, unpause on unspoiler (#259) * Pause spoilered videos on image pages, unpause on unspoiler * Add test * Fix comment --- assets/js/image_expansion.js | 5 +++-- assets/js/utils/__tests__/image.spec.ts | 13 +++++++++++++ assets/js/utils/image.ts | 6 ++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/assets/js/image_expansion.js b/assets/js/image_expansion.js index 66cc379e..7bd6cb26 100644 --- a/assets/js/image_expansion.js +++ b/assets/js/image_expansion.js @@ -87,11 +87,12 @@ function pickAndResize(elem) { } const muted = store.get('unmute_videos') ? '' : 'muted'; + const autoplay = elem.classList.contains('hidden') ? '' : 'autoplay'; // Fix for spoilered image pages if (imageFormat === 'mp4') { elem.classList.add('full-height'); elem.insertAdjacentHTML('afterbegin', - `