From c68b0e9d7ee91f2a6af60b1201a0ebbaf3b0dc6b Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Tue, 24 Jun 2025 10:52:47 -0400 Subject: [PATCH] [tasks] Fix bug in emacs labels --- vrobbler/apps/scrobbles/scrobblers.py | 11 ++++------- vrobbler/apps/tasks/constants.py | 2 ++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/vrobbler/apps/scrobbles/scrobblers.py b/vrobbler/apps/scrobbles/scrobblers.py index 2d8ae98..c34d2a6 100644 --- a/vrobbler/apps/scrobbles/scrobblers.py +++ b/vrobbler/apps/scrobbles/scrobblers.py @@ -34,8 +34,7 @@ from videos.models import Video from webpages.models import WebPage from vrobbler.apps.tasks.constants import ( - TODOIST_TITLE_PREFIX_LABELS, - TODOIST_TITLE_SUFFIX_LABELS, + TODOIST_TITLE_LABELS ) logger = logging.getLogger(__name__) @@ -557,11 +556,9 @@ def emacs_scrobble_task( suffix = "" source_id = task_data.get("source_id") - for label in task_data.get("labels"): - if label in TODOIST_TITLE_PREFIX_LABELS: - prefix = label - if label in TODOIST_TITLE_SUFFIX_LABELS: - suffix = label + for label in task_data.get("labels", []): + if label in TODOIST_TITLE_LABELS: + title = label if not prefix and not suffix: logger.warning( diff --git a/vrobbler/apps/tasks/constants.py b/vrobbler/apps/tasks/constants.py index fda1e7c..adee049 100644 --- a/vrobbler/apps/tasks/constants.py +++ b/vrobbler/apps/tasks/constants.py @@ -4,6 +4,8 @@ TODOIST_TITLE_LABELS = [ "errand", "chore", "admin", + "computer", + "farm", "baking", "meeting", "habit",