[brickset] Little fix to scrobble of bricksets

This commit is contained in:
2025-06-09 10:40:12 -04:00
parent e980e3c5c9
commit 356e579558
2 changed files with 8 additions and 0 deletions

View File

@ -50,6 +50,12 @@ class BrickSet(LongPlayScrobblableMixin):
def get_absolute_url(self):
return reverse("bricksets:brickset_detail", kwargs={"slug": self.uuid})
def __str__(self) -> str:
name = str(self.title)
if not self.title:
name = str(self.number)
return name
@property
def logdata_cls(self):
return BrickSetLogData

View File

@ -870,6 +870,7 @@ def manual_scrobble_brickset(
"timestamp": timezone.now(),
"playback_position_seconds": 0,
"source": "Vrobbler",
"log": {"serial_scrobble_id": ""},
}
logger.info(
"[vrobbler-scrobble] brickset scrobble request received",
@ -882,4 +883,5 @@ def manual_scrobble_brickset(
)
# TODO Kick out a process to enrich the media here, and in every scrobble event
# TODO Need to check for past scrobbles and auto populate serial scrobble id if possible
return Scrobble.create_or_update(brickset, user_id, scrobble_dict)