Add a library page: seasons, race weekends and sessions as Plex shows them
The operator wants to browse the posters the way a Plex or Emby Formula 1 library shows them. The page reads the whole library from the one Kometa file (rounds, race names in the race posters' addresses, sessions in the episodes'), waits through a fresh server's minutes-long first answer instead of failing, and loads each picture only when it is on screen, two at a time, dropping the queue when the reader leaves a level: every poster is a render of about 10 s that pulls map tiles. Each level has its own address and back/forward work; a picture the server has none for is a plain card with its name. The session order per weekend format moves into site.js, so the posters page and the library read the same list. Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
This commit is contained in:
+22
-1
@@ -535,13 +535,34 @@
|
||||
return { current };
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- sessions of a race weekend
|
||||
|
||||
// Kometa's episode numbering per weekend format: the same maps the service renders from
|
||||
// (posters_service.py, _SESSION_STD and _SESSION_SPRINT). [slug, label] in episode order.
|
||||
const SESSIONS = {
|
||||
standard: [
|
||||
['fp1', 'Free Practice 1'], ['fp2', 'Free Practice 2'], ['fp3', 'Free Practice 3'],
|
||||
['pre-qualifying', 'Pre-Qualifying Buildup'], ['qualifying', 'Qualifying'], ['post-qualifying', 'Post-Qualifying'],
|
||||
['pre-race', 'Pre-Race Buildup'], ['race', 'Race'], ['post-race', 'Post-Race'], ['highlights', 'Highlights'],
|
||||
],
|
||||
sprint: [
|
||||
['fp1', 'Free Practice 1'], ['pre-sprint-qualifying', 'Pre-Sprint-Qualifying Buildup'],
|
||||
['sprint-qualifying', 'Sprint Qualifying'], ['post-sprint-qualifying', 'Post-Sprint-Qualifying'],
|
||||
['pre-sprint', 'Pre-Sprint Buildup'], ['sprint', 'Sprint'], ['post-sprint', 'Post-Sprint'],
|
||||
['pre-qualifying', 'Pre-Qualifying Buildup'], ['qualifying', 'Qualifying'], ['post-qualifying', 'Post-Qualifying'],
|
||||
['pre-race', 'Pre-Race Buildup'], ['race', 'Race'], ['post-race', 'Post-Race'], ['highlights', 'Highlights'],
|
||||
['bonus', 'Bonus Content'],
|
||||
],
|
||||
};
|
||||
SESSIONS.label = Object.fromEntries([...SESSIONS.standard, ...SESSIONS.sprint]);
|
||||
|
||||
window.F1 = {
|
||||
DEFAULT_API, JOLPICA, params, base,
|
||||
api, absolute, path, h, fmtSize, notice,
|
||||
setRequest, setStatus, setHint, call, callJSON,
|
||||
prettyJSON, showJSON, showText, showImage, showGeoJSON, sniff, lineOf, lineLength,
|
||||
circuitTree, layoutPicker, layoutYears, layoutStart,
|
||||
racePicker, isSprint, jolpicaURL, linkWithKept,
|
||||
racePicker, isSprint, jolpicaURL, linkWithKept, SESSIONS,
|
||||
};
|
||||
|
||||
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', frame);
|
||||
|
||||
Reference in New Issue
Block a user