feat(race): show contest display name and human-readable countdown

Problem: race notifications showed raw contest IDs (e.g. "2204") and
formatted time as `HH:MM:SS`, which is unreadable for multi-day waits.

Solution: look up `display_name` from cache and use it in the timer
notification. Format countdown as `9d 15h 27m 3s`. Remove redundant
initial log since the timer fires immediately.
This commit is contained in:
Barrett Ruth 2026-03-06 18:14:05 -05:00
parent b90ac67826
commit 326e015f9b
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
2 changed files with 26 additions and 14 deletions

View file

@ -432,6 +432,16 @@ function M.get_contest_start_time(platform, contest_id)
return cache_data[platform][contest_id].start_time
end
---@param platform string
---@param contest_id string
---@return string?
function M.get_contest_display_name(platform, contest_id)
if not cache_data[platform] or not cache_data[platform][contest_id] then
return nil
end
return cache_data[platform][contest_id].display_name
end
---@param platform string
---@return table?
function M.get_credentials(platform)