[scrobbles] Fix log data parsing for tasks and boardgames

Add pagination to task and board game detail pages
This commit is contained in:
2025-07-30 11:37:57 -04:00
parent a7551ef162
commit 9437fdba60
6 changed files with 96 additions and 22 deletions

View File

@ -23,6 +23,16 @@ class TaskLogData(JSONDataclass):
todoist_type: Optional[str] = None
notes: Optional[dict] = None
def notes_as_str(self) -> str:
"""Return formatted notes with line breaks and no keys"""
note_block = ""
if not self.notes:
return note_block
for id, content in self.notes.items():
note_block += content + "</br>"
return note_block
class Task(LongPlayScrobblableMixin):
"""Basically a holder for Todoist Tasks
@ -42,9 +52,9 @@ class Task(LongPlayScrobblableMixin):
def strings(self) -> ScrobblableConstants:
return ScrobblableConstants(verb="Doing", tags="memo")
# @property
# def logdata_cls(self):
# return TaskLogData
@property
def logdata_cls(self):
return TaskLogData
def source_url_for_user(self, user_id) -> str:
url = ""