mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 02:46:16 -08:00
fix(dashboard): read cached EPG timestamps as unix seconds (#1532)
`epgTimestampMs` in the dashboard live-EPG helpers returned `EpgProgram.startTimestamp`/`stopTimestamp` as-is, but those fields are unix SECONDS everywhere else (`getProgramTimeMs` in `@iptvnator/ui/epg` multiplies by 1000). The bug was latent: the backend `GET_CURRENT_PROGRAMS_BATCH` rows never set the fields, so the ISO fallback always ran. Scale a positive finite timestamp by 1000 and treat zero/non-finite values as absent, mirroring `getProgramTimeMs`. Add a dedicated spec that feeds seconds-based timestamps and asserts the formatted range and progress, and fix the rails component spec fixture, which stored millisecond values in the seconds fields and so encoded the old bug. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
eb8e997c8f
commit
4d8559976c
4 files changed
+159
-41
No files matched your search
@@ -0,0 +1,9 @@
|
||||
---
|
||||
type: internal
|
||||
area: dashboard
|
||||
---
|
||||
|
||||
The dashboard's live "now playing" time range and progress bar now read
|
||||
pre-computed EPG timestamps as unix seconds, matching the rest of the EPG
|
||||
code. Today's dashboard lookups never carry those fields, so nothing changes
|
||||
on screen; this closes the gap before a future data path supplies them.
|
||||
Reference in new issue
Block a user