Add Radio Browser station importer

This commit is contained in:
2026-04-26 14:33:55 +02:00
parent 7e256a669e
commit 972164bba7
14 changed files with 36414 additions and 112 deletions

View File

@@ -0,0 +1,12 @@
import type { RadioStation } from './radioTypes.js';
export async function loadRadioStations(): Promise<RadioStation[]> {
const response = await fetch('/data/radio-stations.json');
if (!response.ok) {
throw new Error(`Failed to load radio stations: ${response.status}`);
}
const stations = (await response.json()) as RadioStation[];
return Array.isArray(stations) ? stations : [];
}