This commit is contained in:
Rafal Sroka
2026-04-17 22:35:14 +02:00
parent eeca20e70d
commit fc4782f340
@@ -1,18 +1,19 @@
import Foundation
struct BroadcastItem: Identifiable {
let id: String // round ID used for linking
let title: String // group name or tour name
let id: String
/// Group name when the broadcast belongs to a grouped tournament, otherwise the tour name.
let title: String
let roundName: String
let tourSlug: String
let roundSlug: String
let isLive: Bool
let startsAt: Date?
let imageData: Data? // tournament thumbnail fetched from the API
let thumbnailImageName: String? // bundled asset name used as static fallback (widget gallery)
let imageData: Data?
/// Bundled asset name used as a static fallback in the widget gallery when no network image is available.
let thumbnailImageName: String?
/// Builds the lichess.org broadcast URL for this item.
/// Slugs are SEO-only so the actual round id drives routing.
/// Slugs are SEO-only; the round id is what actually drives routing.
func broadcastURL() -> URL? {
LichessAppGroup.lichessURL(
path: "/broadcast/\(tourSlug)/\(roundSlug)/\(id)"