Browse Source

[scrobbles] CLean up some dataclasses

Colin Powell 2 weeks ago
parent
commit
06e075553a
1 changed files with 7 additions and 5 deletions
  1. 7 5
      vrobbler/apps/scrobbles/dataclasses.py

+ 7 - 5
vrobbler/apps/scrobbles/dataclasses.py

@@ -32,14 +32,13 @@ class JSONDataclass(JSONWizard):
 
 @dataclass
 class BaseLogData(JSONDataclass):
-    details: Optional[str] = None
-    notes: Optional[str] = None
+    description: Optional[str] = None
+    notes: Optional[list[str]] = None
 
 
 @dataclass
 class LongPlayLogData(JSONDataclass):
-    complete: Optional[bool] = None
-    serial_scrobble_id: Optional[int] = None
+    long_play_complete: bool = False
 
 
 @dataclass
@@ -52,4 +51,7 @@ class WithPeopleLogData(JSONDataclass):
 
         if not self.with_people_ids:
             return []
-        return [Person.objects.filter(id=pid) for pid in self.with_people_ids]
+        return [
+            Person.objects.filter(id=pid).first()
+            for pid in self.with_people_ids
+        ]