[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

@ -2,6 +2,7 @@
We should convert this PROJECT file to put tickets in a subdirectory, tickets, with each ticket having it's own shortid_title.org
* Overview
Vrobbler began humbly enough as a way to use Jellyfin's webhook to keep track of
the shows and movies I was watching. More specifically, I broke my ankle a few
days after Christmas in 2022 and spent the next four months very slowly
@ -85,15 +86,7 @@ fetching and simple saving.
**** Bookmarklet
*** Metadata sources
**** Scraper
* Chores
** DONE Document various vrobbler features :chore:personal:project:vrobbler:documentation:
:PROPERTIES:
:ID: 514e9285-96f1-265f-56df-118c12f60918
:END:
:LOGBOOK:
CLOCK: [2025-07-09 Wed 09:55]--[2025-07-09 Wed 10:15] => 0:20
:END:
* Backlog [0/12] :vrobbler:project:personal:
* Backlog [1/13] :vrobbler:project:personal:
** TODO [#C] Create small utility to clean up tracks scrobbled with wonky playback times :vrobbler:personal:bug:music:scrobbles:
:PROPERTIES:
:ID: 702462cf-d54b-48c6-8a7c-78b8de751deb
@ -505,6 +498,62 @@ needed import celery task. This is how the WebDAV celery task currently works.
This would also be an opporunity to clean up the code around WebDAV imports
and make them more re-usable for other import services.
** DONE [#B] Change sports scrobbling a bit :feature:sports:scrobbles:
:PROPERTIES:
:ID: cd27d683-c847-4251-b3d1-8243f45c01ca
:END:
*** Description
Currently, the way we scrobble sports means that basically the same event will
never be scrobbled again. I will likely never watch the 2025 Monaco Grand Prix
again, but I will watch the Monaco Grand Prix again. But I also wont watch one
specific game between Arsenal and Man City twice, but I may watch those two
teams play multiple times.
What if instead of scrobbling a specific sports event on a specific date, we
make the unique Scrobblable item the players or teams in the event?
That would not work for races where the unique item would have to be the name of
the event.
Maybe that means SportEvent is too generic, and we'd need the event type to be
scrobble items.
A race, the Indy 500 or Coke 600, or Boston Marathon would be scrobblable, while
for games, the teams would be unique, so a game between Arsenal and Man City
would be unique (with extra logdata context for who's home and who's away, and
the location, could even have the weather per scrobble).
And finally, for Tennis, the title would be the round of the event, Roland
Garros Women's Semifinal, US Open Men's Final, Miami Invitational Round of 32,
with two players, or two teams and a start datetime, which is similar to what we
have now. The round becomes not a foreign key, but just a string, and we'd need
a FK to an organizer field which would replace league, and would be like "ATP
Tour" or "PGA Tour". Season would also need to be a string, and would be
something like: 2026 or 2024-2025.
Examples:
- Super Bowl
- Sochaux v Concarneau
- French Open Final
- Carlos Alcaraz v Jannik Sinner
We'd also want a script to reorganize existing sports events and move scrobbles
to the right place as best as we're able, and to flag sportsevents and scrobbles
that could not automatically be migrated with a unique tag like
"migration-failed"
Ultimately I think what we need is to greatly simplify the SportEvent to be just a placeholder
for a sport event type for a given league, then each scrobble holds the details of teams, players
start, thesportsdb_id, round and season.
Thus, I've already simplified that model, but what we need is a migration script that will move
existing complex SportEvent instances into very basic ones, and updating any scrobbles for those
events with a new SportEventLogData structure with all the specific details in it. We also need to
move the obj.round.season.league into the FK for the given event.
* Version 46.0 [1/1]
** DONE [#C] Add sentiment parsing for Scrobbles with notes :scrobbles:sentiment:
:PROPERTIES: