Re #239 - Individual GUID for watch+changeevent (#241)

* Re #239 - Individual GUID for watch+changeevent
pull/244/head
dgtlmoon 3 years ago committed by GitHub
parent df0b7bb0fe
commit ca0ab50c5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -270,11 +270,14 @@ def changedetection_app(config=None, datastore_o=None):
for watch in sorted_watches: for watch in sorted_watches:
if not watch['viewed']: if not watch['viewed']:
# Re #239 - GUID needs to be individual for each event
# @todo In the future make this a configurable link back (see work on BASE_URL https://github.com/dgtlmoon/changedetection.io/pull/228)
guid = "{}/{}".format(watch['uuid'], watch['last_changed'])
fe = fg.add_entry() fe = fg.add_entry()
fe.title(watch['url']) fe.title(watch['url'])
fe.link(href=watch['url']) fe.link(href=watch['url'])
fe.description(watch['url']) fe.description(watch['url'])
fe.guid(watch['uuid'], permalink=False) fe.guid(guid, permalink=False)
dt = datetime.datetime.fromtimestamp(int(watch['newest_history_key'])) dt = datetime.datetime.fromtimestamp(int(watch['newest_history_key']))
dt = dt.replace(tzinfo=pytz.UTC) dt = dt.replace(tzinfo=pytz.UTC)
fe.pubDate(dt) fe.pubDate(dt)

Loading…
Cancel
Save