From 26d82518fab7dd89d74de5047874fc6259ed6db0 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Tue, 15 Oct 2024 14:52:58 -0400 Subject: [PATCH] [tasks] Temporarily don't use updated_at --- vrobbler/apps/scrobbles/scrobblers.py | 5 +++-- vrobbler/apps/tasks/webhooks.py | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vrobbler/apps/scrobbles/scrobblers.py b/vrobbler/apps/scrobbles/scrobblers.py index 21dfc4b..4f73c9f 100644 --- a/vrobbler/apps/scrobbles/scrobblers.py +++ b/vrobbler/apps/scrobbles/scrobblers.py @@ -339,11 +339,12 @@ def todoist_scrobble_task(todoist_task: dict, user_id: int) -> Scrobble: task = Task.find_or_create(title) + # TODO Should use updated_at from TOdoist, but parsing isn't working scrobble_dict = { "user_id": user_id, - "timestamp": todoist_task.get("timestamp_utc", timezone.now()), + "timestamp": timezone.now(), "playback_position_seconds": 0, - "source": "Todoist Webhook", + "source": "Todoist", "log": todoist_task, } diff --git a/vrobbler/apps/tasks/webhooks.py b/vrobbler/apps/tasks/webhooks.py index 41131bd..3c2a87e 100644 --- a/vrobbler/apps/tasks/webhooks.py +++ b/vrobbler/apps/tasks/webhooks.py @@ -34,7 +34,6 @@ def todoist_webhook(request): "todoist_project_id": event_data.get("project_id"), "description": event_data.get("content"), "details": event_data.get("description"), - "timestamp_utc": pendulum.parse(event_data.get("updated_at")), } if todoist_task["todoist_type"] != "item" or todoist_task[