[scrobbles] Fix log data parsing for tasks and boardgames
Add pagination to task and board game detail pages
This commit is contained in:
@ -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 = ""
|
||||
|
||||
Reference in New Issue
Block a user