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 */
|
/** 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 ?? {};
|
||||||
type: h._source?.type ?? 'unknown',
|
return {
|
||||||
title: h._source?.title ?? '',
|
id: page.map ?? h._id ?? '',
|
||||||
subtitle: h._source?.subtitle ?? '',
|
type: h._source?.type ?? 'unknown',
|
||||||
url: h._source?.url ?? '',
|
title: page.title ?? '',
|
||||||
}));
|
subtitle: page.subtitle ?? '',
|
||||||
|
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 |
|
|
@ -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, '');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue