From 410dae3e3302333fc39706b85e46c31fb00046c4 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 10 Sep 2025 13:53:21 +0200 Subject: [PATCH] Set `watch_title` correctly --- changedetectionio/blueprint/rss/blueprint.py | 3 +-- changedetectionio/notification/handler.py | 2 +- changedetectionio/templates/_common_fields.html | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/changedetectionio/blueprint/rss/blueprint.py b/changedetectionio/blueprint/rss/blueprint.py index edaa5b1ec..d5da90665 100644 --- a/changedetectionio/blueprint/rss/blueprint.py +++ b/changedetectionio/blueprint/rss/blueprint.py @@ -110,8 +110,7 @@ def construct_blueprint(datastore: ChangeDetectionStore): # @todo watch should be a getter - watch.get('title') (internally if URL else..) - watch_title = watch.get('title') if watch.get('title') else watch.get('url') - fe.title(title=watch_title) + fe.title(title=watch.label) try: html_diff = diff.render_diff(previous_version_file_contents=watch.get_history_snapshot(dates[-2]), diff --git a/changedetectionio/notification/handler.py b/changedetectionio/notification/handler.py index fc7628fe3..c1b3c1253 100644 --- a/changedetectionio/notification/handler.py +++ b/changedetectionio/notification/handler.py @@ -149,7 +149,7 @@ def create_notification_parameters(n_object, datastore): uuid = n_object['uuid'] if 'uuid' in n_object else '' if uuid: - watch_title = datastore.data['watching'][uuid].get('title', '') + watch_title = datastore.data['watching'][uuid].label tag_list = [] tags = datastore.get_all_tags_for_watch(uuid) if tags: diff --git a/changedetectionio/templates/_common_fields.html b/changedetectionio/templates/_common_fields.html index b2036eded..f6452675a 100644 --- a/changedetectionio/templates/_common_fields.html +++ b/changedetectionio/templates/_common_fields.html @@ -70,7 +70,7 @@ {{ '{{watch_title}}' }} - The page title of the watch, uses <title> if not set. + The page title of the watch, uses <title> if not set, falls back to URL {{ '{{watch_tag}}' }}