Fix Marquee desync bug; add time/temp footer with progress bar at full width
This commit is contained in:
1 parent
607fe9abe4
commit
f864d43888
2 files changed
+91
-29
No files matched your search
@@ -1,10 +1,10 @@
|
||||
# subwave-nowplaying
|
||||
|
||||
Tronbyt/Tidbyt app showing the current track on a [SUB/WAVE](https://github.com/perminder-klair/subwave)
|
||||
internet radio station: album art, track title, artist, the current show
|
||||
and host, and a progress bar for the track pinned to the bottom, with
|
||||
title/artist/show scrolling if they don't fit. Color scheme (cyan
|
||||
title/artist, gray label, white show name, magenta host/progress bar) is
|
||||
internet radio station: album art, track title/artist (scrolling), a thin
|
||||
separator, the current show and host, and a full-width footer with
|
||||
time/temperature and a track progress bar pinned to the bottom edge. Color
|
||||
scheme (cyan title/artist, white show name, magenta host/progress bar) is
|
||||
loosely modeled on SUB/WAVE's own web now-playing display.
|
||||
|
||||
Not tied to any specific station — set your own station's base URL in the
|
||||
@@ -27,9 +27,23 @@ app's config when adding it to a device.
|
||||
instead of stale track info.
|
||||
- If a track has no `subsonic_id`, or the cover fetch fails, falls back to a
|
||||
full-width layout with no art rather than a broken image.
|
||||
- Shows a "-- Show --" label, the current show name
|
||||
(`context.activeShow.name`), and host name (`dj.name`) below the artist,
|
||||
and a track progress bar pinned to the very bottom.
|
||||
- Shows the current show name (`context.activeShow.name`) and host name
|
||||
(`dj.name`) below the artist, separated by a thin divider line.
|
||||
- Shows the local time and temperature (`context.clock`/`context.weather`)
|
||||
and the track progress bar as a full-width (64px) footer overlaid on the
|
||||
bottom of the layout — not confined to the 32px-wide text column, which
|
||||
gives roughly 2x the character budget for the time/temp line (at the cost
|
||||
of covering the bottom ~9px of the album art with a translucent bar).
|
||||
|
||||
**Why show/host/time-temp are plain Text, not Marquee:** pixlet's Marquee
|
||||
runs its own internal scroll-cycle animation regardless of whether the text
|
||||
actually needs to scroll, and combining multiple Marquees with very
|
||||
different cycle lengths in one Root desyncs them — confirmed via an
|
||||
isolated repro where a short Marquee'd line intermittently collapsed to a
|
||||
single character on frames where the long title/artist marquees were
|
||||
mid-cycle. Only title/artist (which actually benefit from scrolling for
|
||||
long names) use Marquee; the shorter supplementary fields use plain
|
||||
Text/Row and just clip if too wide, which is an acceptable tradeoff.
|
||||
|
||||
**Progress bar caveat:** the now-playing API reports track `duration` but
|
||||
not elapsed/remaining time, so the app tracks playback position itself —
|
||||
|
||||