Fix: Radio search results empty + texture quality
- Search API: read title/subtitle/url from _source.page (nested) - Channel click: extract correct ID from URL (last segment) - Replace earth texture with higher-res 4096x2048 original Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a1a49f0ec3
commit
e0635b30ef
3 changed files with 11 additions and 8 deletions
|
|
@ -77,13 +77,16 @@ export async function fetchPlaceChannels(placeId: string): Promise<RadioChannel[
|
|||
/** Sender/Orte/Länder suchen */
|
||||
export async function searchStations(query: string): Promise<SearchHit[]> {
|
||||
const data = await apiFetch(`/search?q=${encodeURIComponent(query)}`);
|
||||
return (data?.hits?.hits ?? []).map((h: any) => ({
|
||||
id: h._id ?? '',
|
||||
type: h._source?.type ?? 'unknown',
|
||||
title: h._source?.title ?? '',
|
||||
subtitle: h._source?.subtitle ?? '',
|
||||
url: h._source?.url ?? '',
|
||||
}));
|
||||
return (data?.hits?.hits ?? []).map((h: any) => {
|
||||
const page = h._source?.page ?? {};
|
||||
return {
|
||||
id: page.map ?? h._id ?? '',
|
||||
type: h._source?.type ?? 'unknown',
|
||||
title: page.title ?? '',
|
||||
subtitle: page.subtitle ?? '',
|
||||
url: page.url ?? '',
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/** Stream-URL auflösen (302 Redirect → tatsächliche Icecast/Shoutcast URL) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue