[sports] Big sports structure revamp
Some checks failed
build / test (push) Has been cancelled

This should make scrobbling sports more like tasks.

The root scrobbled items are a little more generic, but
it's easier to see viewing patterns.
This commit is contained in:
2026-06-06 23:32:21 -04:00
parent 4bf22c96e9
commit ea1b43d1b8
17 changed files with 547 additions and 111 deletions

View File

@ -242,12 +242,13 @@ def manual_scrobble_event(
):
data_dict = lookup_event_from_thesportsdb(thesportsdb_id)
event = SportEvent.find_or_create(data_dict)
event, logdata = SportEvent.find_or_create(data_dict)
scrobble_dict = {
"user_id": user_id,
"timestamp": timezone.now(),
"playback_position_seconds": 0,
"source": "TheSportsDB",
"log": logdata,
}
return Scrobble.create_or_update(event, user_id, scrobble_dict)