diff --git a/public/sw.js b/public/sw.js index 1d3257b..90ce20d 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'ns-v52'; +const CACHE = 'ns-v53'; const PRECACHE = ['/', 'index.html', 'manifest.json', 'icon.svg']; const SKIP_PATHS = ['/rest/stream', '/rest/download', '/config.js']; // Auth token params stripped from cache keys so artwork survives across sessions/token refreshes. diff --git a/src/utils.js b/src/utils.js index ae1b32b..497ca12 100644 --- a/src/utils.js +++ b/src/utils.js @@ -45,13 +45,12 @@ export function formatDur(s) { return `${m}:${sec.toString().padStart(2,'0')}`; } -// Compact count for fan numbers etc.: 559534 → "559,5 Tsd.", 1200000 → "1,2 Mio." +// Fan/count formatting in German: full grouped number up to a million (559534 → "559.542"), +// then compact millions (1200000 → "1,2 Mio."). export function fmtCount(n) { if (n == null || isNaN(n)) return ''; - const de = x => x.toFixed(1).replace(/\.0$/, '').replace('.', ','); - if (n >= 1e6) return de(n / 1e6) + ' Mio.'; - if (n >= 1e3) return de(n / 1e3) + ' Tsd.'; - return String(n); + if (n >= 1e6) return (n / 1e6).toFixed(1).replace(/\.0$/, '').replace('.', ',') + ' Mio.'; + return Math.round(n).toLocaleString('de-DE'); } export function toast(msg) {