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 */ /** Sender/Orte/Länder suchen */
export async function searchStations(query: string): Promise<SearchHit[]> { export async function searchStations(query: string): Promise<SearchHit[]> {
const data = await apiFetch(`/search?q=${encodeURIComponent(query)}`); const data = await apiFetch(`/search?q=${encodeURIComponent(query)}`);
return (data?.hits?.hits ?? []).map((h: any) => ({ return (data?.hits?.hits ?? []).map((h: any) => {
id: h._id ?? '', const page = h._source?.page ?? {};
return {
id: page.map ?? h._id ?? '',
type: h._source?.type ?? 'unknown', type: h._source?.type ?? 'unknown',
title: h._source?.title ?? '', title: page.title ?? '',
subtitle: h._source?.subtitle ?? '', subtitle: page.subtitle ?? '',
url: h._source?.url ?? '', url: page.url ?? '',
})); };
});
} }
/** Stream-URL auflösen (302 Redirect → tatsächliche Icecast/Shoutcast 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([]); setSearchResults([]);
if (hit.type === 'channel') { if (hit.type === 'channel') {
const channelId = hit.url.match(/\/listen\/([^/]+)/)?.[1]; const channelId = hit.url.match(/\/listen\/[^/]+\/([^/]+)/)?.[1];
if (channelId) { if (channelId) {
handlePlay(channelId, hit.title, hit.subtitle, ''); handlePlay(channelId, hit.title, hit.subtitle, '');
} }