From 9bb7824a381c589ce493cc215f73f485a05c0226 Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Mon, 2 Feb 2026 12:27:23 +0300 Subject: [PATCH] Add Memory mode for On This Day scheduled assets Add new "Memory (On This Day)" option to scheduled assets Order By selector. When selected, fetches photos taken on today's date in previous years using the on_this_day parameter from get_assets service. Co-Authored-By: Claude Opus 4.5 --- Common/Immich Album Watcher/README.md | 9 ++++++++- Common/Immich Album Watcher/blueprint.yaml | 22 +++++++++++++++++----- manifest.json | 2 +- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Common/Immich Album Watcher/README.md b/Common/Immich Album Watcher/README.md index a6964f4..fe0e612 100644 --- a/Common/Immich Album Watcher/README.md +++ b/Common/Immich Album Watcher/README.md @@ -199,12 +199,19 @@ Sends scheduled notifications with existing assets from tracked albums. Uses the | `limit` | Maximum number of assets to fetch (1-100) | | `favorite_only` | Only fetch favorite assets | | `asset_type` | Filter by type (all, photo, video) | -| `order_by` | Sort by (random, date, rating, name) | +| `order_by` | Sort by (random, date, rating, name, memory) | | `order` | Sort direction (ascending, descending) | | `filter_min_rating` | Minimum rating filter (1-5, 0 = no filter) | | `min_date` | Assets created on or after this date (YYYY-MM-DD) | | `max_date` | Assets created on or before this date (YYYY-MM-DD) | +#### Memory Mode ("On This Day") + +When `order_by` is set to `memory`, the blueprint fetches photos taken on today's date in previous years - similar to "On This Day" memories in photo apps. This mode automatically: + +- Uses the `on_this_day` parameter with the current date +- Sorts by date in ascending order (oldest first) + ### Scheduled Assets Message Template Variables | Variable | Description | diff --git a/Common/Immich Album Watcher/blueprint.yaml b/Common/Immich Album Watcher/blueprint.yaml index 84e525a..6890f6f 100644 --- a/Common/Immich Album Watcher/blueprint.yaml +++ b/Common/Immich Album Watcher/blueprint.yaml @@ -567,7 +567,9 @@ blueprint: scheduled_assets_order_by: name: Order By - description: "How to sort/select assets" + description: > + How to sort/select assets. + Memory mode fetches photos taken on today's date in previous years ("On This Day"). default: "random" selector: select: @@ -580,6 +582,8 @@ blueprint: value: "rating" - label: "Name" value: "name" + - label: "Memory (On This Day)" + value: "memory" scheduled_assets_order: name: Order Direction @@ -1233,12 +1237,16 @@ action: # Build service data dynamically (omit optional params when not set) - variables: get_assets_data: > + {% set is_memory_mode = scheduled_assets_order_by == 'memory' %} {% set data = { 'limit': scheduled_assets_limit | int, 'favorite_only': scheduled_assets_favorite_only, - 'order_by': scheduled_assets_order_by, - 'order': scheduled_assets_order + 'order_by': 'date' if is_memory_mode else scheduled_assets_order_by, + 'order': 'ascending' if is_memory_mode else scheduled_assets_order } %} + {% if is_memory_mode %} + {% set data = dict(data, on_this_day=now().strftime('%Y-%m-%d')) %} + {% endif %} {% if scheduled_assets_type != 'all' %} {% set data = dict(data, asset_type=scheduled_assets_type) %} {% endif %} @@ -1470,12 +1478,16 @@ action: # Build service data dynamically (omit optional params when not set) - variables: combined_get_assets_data: > + {% set is_memory_mode = scheduled_assets_order_by == 'memory' %} {% set data = { 'limit': per_album_limit | int, 'favorite_only': scheduled_assets_favorite_only, - 'order_by': scheduled_assets_order_by, - 'order': scheduled_assets_order + 'order_by': 'date' if is_memory_mode else scheduled_assets_order_by, + 'order': 'ascending' if is_memory_mode else scheduled_assets_order } %} + {% if is_memory_mode %} + {% set data = dict(data, on_this_day=now().strftime('%Y-%m-%d')) %} + {% endif %} {% if scheduled_assets_type != 'all' %} {% set data = dict(data, asset_type=scheduled_assets_type) %} {% endif %} diff --git a/manifest.json b/manifest.json index 06d58f6..39708a0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,3 +1,3 @@ { - "version": "1.23.3" + "version": "1.24.0" }