pull/3609/head
dgtlmoon 2025-11-12 16:54:45 +01:00
rodzic 98a4fd1290
commit 6ee21e769b
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -69,7 +69,8 @@ def construct_blueprint(datastore: ChangeDetectionStore):
except FileNotFoundError as e:
html_diff = f"History snapshot file for watch {watch.get('uuid')}@{watch.last_changed} - '{watch.get('title')} not found."
rss_template = "{{watch_title}} had a change.\n\n{{html_diff}}\n"
# @note: We use <pre> because nearly all RSS readers render only HTML (Thunderbird for example cant do just plaintext)
rss_template = "<pre>{{watch_title}} had a change.\n\n{{html_diff}}\n</pre>"
if 'html' in rss_content_format:
rss_template = "<html><body>\n<h4><a href=\"{{watch_url}}\">{{watch_title}}</a></h4>\n<p>{{html_diff}}</p>\n</body></html>\n"

Wyświetl plik

@ -1106,7 +1106,7 @@ class ChangeDetectionStore:
# might have been 'plaintext, 'plain text' or something
self.data['settings']['application']['rss_content_format'] = RSS_CONTENT_FORMAT_DEFAULT
elif 'html' in rss_format:
self.data['settings']['application']['rss_content_format'] = 'html'
self.data['settings']['application']['rss_content_format'] = 'htmlcolor'
else:
# safe fallback to text
self.data['settings']['application']['rss_content_format'] = RSS_CONTENT_FORMAT_DEFAULT
self.data['settings']['application']['rss_content_format'] = RSS_CONTENT_FORMAT_DEFAULT