From 460ad08c02ef2ffb21f3c83b37917a54e9a24c58 Mon Sep 17 00:00:00 2001 From: Jage9 Date: Sun, 22 Feb 2026 01:59:49 -0500 Subject: [PATCH] Skip cache-buster query for Dropbox stream URLs --- client/public/version.js | 2 +- client/src/audio/radioStationRuntime.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/client/public/version.js b/client/public/version.js index 379ffbe..a95b614 100644 --- a/client/public/version.js +++ b/client/public/version.js @@ -1,5 +1,5 @@ // Maintainer-controlled web client version. // Format: YYYY.MM.DD Rn (example: 2026.02.20 R2) -window.CHGRID_WEB_VERSION = "2026.02.22 R136"; +window.CHGRID_WEB_VERSION = "2026.02.22 R137"; // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. window.CHGRID_TIME_ZONE = "America/Detroit"; diff --git a/client/src/audio/radioStationRuntime.ts b/client/src/audio/radioStationRuntime.ts index 8a1da9e..d838eba 100644 --- a/client/src/audio/radioStationRuntime.ts +++ b/client/src/audio/radioStationRuntime.ts @@ -109,6 +109,15 @@ function connectRadioChannelSource( } function freshStreamUrl(streamUrl: string): string { + try { + const parsed = new URL(streamUrl); + const hostname = parsed.hostname.toLowerCase(); + if (hostname.endsWith('dropbox.com') || hostname.endsWith('dropboxusercontent.com')) { + return streamUrl; + } + } catch { + // Leave non-URL strings to the generic cache-buster behavior below. + } const separator = streamUrl.includes('?') ? '&' : '?'; return `${streamUrl}${separator}chgrid_start=${Date.now()}`; }