Skip cache-buster query for Dropbox stream URLs

This commit is contained in:
Jage9
2026-02-22 01:59:49 -05:00
parent 93bb778cd7
commit 460ad08c02
2 changed files with 10 additions and 1 deletions

View File

@@ -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()}`;
}