From 8773542099e43f58faadf0806bc50b3b929708ee Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sun, 8 Jun 2025 03:05:43 -0400 Subject: [PATCH] [tasks] Fix source being orgmode not emacs --- vrobbler/apps/scrobbles/scrobblers.py | 2 +- vrobbler/apps/tasks/webhooks.py | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/vrobbler/apps/scrobbles/scrobblers.py b/vrobbler/apps/scrobbles/scrobblers.py index 60932be..fd6def5 100644 --- a/vrobbler/apps/scrobbles/scrobblers.py +++ b/vrobbler/apps/scrobbles/scrobblers.py @@ -580,7 +580,7 @@ def emacs_scrobble_task( user_id=user_id, in_progress=True, log__source_id=source_id, - log__source="emacs", + log__source="orgmode", task=task, ).last() diff --git a/vrobbler/apps/tasks/webhooks.py b/vrobbler/apps/tasks/webhooks.py index cf3c6ac..68225fc 100644 --- a/vrobbler/apps/tasks/webhooks.py +++ b/vrobbler/apps/tasks/webhooks.py @@ -149,17 +149,12 @@ def emacs_webhook(request): post_data, user_id, started=task_in_progress, stopped=task_stopped ) - if scrobble and task_in_progress: - if post_data.get("notes"): - scrobble = emacs_scrobble_update_task( - post_data.get("source_id"), - post_data.get("notes"), - user_id, - ) - if scrobble: - return Response( - {"scrobble_id": scrobble.id}, status=status.HTTP_200_OK - ) + if scrobble and task_in_progress and post_data.get("notes"): + emacs_scrobble_update_task( + post_data.get("source_id"), + post_data.get("notes"), + user_id, + ) if not scrobble: logger.info(