diff --git a/vrobbler/apps/scrobbles/scrobblers.py b/vrobbler/apps/scrobbles/scrobblers.py index ad5bfc1..2d8ae98 100644 --- a/vrobbler/apps/scrobbles/scrobblers.py +++ b/vrobbler/apps/scrobbles/scrobblers.py @@ -421,10 +421,8 @@ def todoist_scrobble_task( # user.profile.task_context_tags which will result in context-based tag titles # We'd also have to migrate existing tasks to the new context based ones (maybe) for label in todoist_task["todoist_label_list"]: - if label in TODOIST_TITLE_PREFIX_LABELS: - prefix = label - if label in TODOIST_TITLE_SUFFIX_LABELS: - suffix = label + if label in TODOIST_TITLE_LABELS: + title = label if not prefix and suffix: logger.warning( @@ -432,8 +430,6 @@ def todoist_scrobble_task( extra={"todoist_scrobble_task": todoist_task}, ) - title = " ".join([prefix.capitalize(), suffix.capitalize()]) - task = Task.find_or_create(title) timestamp = pendulum.parse(todoist_task.get("updated_at", timezone.now())) diff --git a/vrobbler/apps/tasks/constants.py b/vrobbler/apps/tasks/constants.py index 7eed87b..fda1e7c 100644 --- a/vrobbler/apps/tasks/constants.py +++ b/vrobbler/apps/tasks/constants.py @@ -1,10 +1,10 @@ -TODOIST_TITLE_PREFIX_LABELS = ["work", "home", "personal"] -TODOIST_TITLE_SUFFIX_LABELS = [ +TODOIST_TITLE_LABELS = [ "bug", - "project", + "feature", "errand", "chore", "admin", + "baking", "meeting", "habit", "research",