diff --git a/src/lib/music/HoursChart.svelte b/src/lib/music/HoursChart.svelte
index 1e350c8..de34185 100644
--- a/src/lib/music/HoursChart.svelte
+++ b/src/lib/music/HoursChart.svelte
@@ -131,12 +131,13 @@
>
{exactHours(tip.hours)}
{tip.title}{#if tip.plays != null}
- · {tip.plays.toLocaleString('en-GB')} {tip.plays === 1 ? 'play' : 'plays'}{/if}{tip.title}{tip.plays != null
+ ? ` · ${tip.plays.toLocaleString('en-GB')} ${tip.plays === 1 ? 'play' : 'plays'}`
+ : ''}
{#if tip.segments?.length}
- {#each [...tip.segments].reverse() as seg (seg.name)}
+ {#each [...tip.segments].sort((x, y) => y.hours - x.hours) as seg (seg.name)}
-
{seg.name}
diff --git a/src/routes/trackers/music/+page.svelte b/src/routes/trackers/music/+page.svelte
index 8701a38..c9f48ee 100644
--- a/src/routes/trackers/music/+page.svelte
+++ b/src/routes/trackers/music/+page.svelte
@@ -92,6 +92,11 @@
clockHover = { dow, hour };
}
const maxDiscovered = $derived(Math.max(1, ...s.discoveredByYear.map((d) => d.artists)));
+ const longestRange = $derived(
+ s.streak.longestStart && s.streak.longestEnd && s.streak.longest > 1
+ ? ` (${date(s.streak.longestStart, { day: 'numeric', month: 'short', year: 'numeric' })} – ${date(s.streak.longestEnd, { day: 'numeric', month: 'short', year: 'numeric' })})`
+ : ''
+ );
const perDay = $derived(s.totals.hours / Math.max(1, s.totals.spanDays));
const sourceLabel: Record = {
spotify: 'Spotify',
@@ -201,13 +206,9 @@
-
{s.streak.current} day{s.streak.current === 1 ? '' : 's'}
longest {s.streak.longest}{#if s.streak.longestStart && s.streak.longest > 1}
- ({shortDay(s.streak.longestStart)}
- {date(s.streak.longestStart, {
- year: 'numeric'
- })}–{shortDay(s.streak.longestEnd ?? '')}
- {date(s.streak.longestEnd ?? s.streak.longestStart, { year: 'numeric' })}){/if}
- · listened {nf(s.totals.daysListened)} of {nf(s.totals.spanDays)} dayslongest {s.streak.longest}{longestRange} · listened {nf(s.totals.daysListened)} of {nf(
+ s.totals.spanDays
+ )} days
@@ -444,7 +445,7 @@
{DAYS[d]}
{#each row as cell, h (h)}