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:
Daniel 2026-03-06 10:00:44 +01:00
parent a1a49f0ec3
commit e0635b30ef
3 changed files with 11 additions and 8 deletions

View file

@ -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) */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 776 KiB

After

Width:  |  Height:  |  Size: 698 KiB

Before After
Before After

View file

@ -332,7 +332,7 @@ export default function RadioTab({ data }: { data: any }) {
setSearchResults([]);
if (hit.type === 'channel') {
const channelId = hit.url.match(/\/listen\/([^/]+)/)?.[1];
const channelId = hit.url.match(/\/listen\/[^/]+\/([^/]+)/)?.[1];
if (channelId) {
handlePlay(channelId, hit.title, hit.subtitle, '');
}