diff --git a/app/api/curator/specials/[id]/route.ts b/app/api/curator/specials/[id]/route.ts
index a4c7a90..da6e1e9 100644
--- a/app/api/curator/specials/[id]/route.ts
+++ b/app/api/curator/specials/[id]/route.ts
@@ -52,7 +52,14 @@ export async function GET(
return NextResponse.json({ error: 'Special not found' }, { status: 404 });
}
- return NextResponse.json(special);
+ // Filtere Songs ohne vollständige Song-Daten (song, song.filename)
+ // Dies verhindert Fehler im Frontend, wenn Songs gelöscht wurden oder Daten fehlen
+ const filteredSongs = special.songs.filter(ss => ss.song && ss.song.filename);
+
+ return NextResponse.json({
+ ...special,
+ songs: filteredSongs,
+ });
}
diff --git a/components/CurateSpecialEditor.tsx b/components/CurateSpecialEditor.tsx
index 5bdf3a5..1f5a8d7 100644
--- a/components/CurateSpecialEditor.tsx
+++ b/components/CurateSpecialEditor.tsx
@@ -62,11 +62,14 @@ export default function CurateSpecialEditor({
saveChangesLabel = '💾 Save Changes',
savedLabel = '✓ Saved',
}: CurateSpecialEditorProps) {
+ // Filtere Songs ohne vollständige Song-Daten (song, song.filename)
+ const validSongs = special.songs.filter(ss => ss.song && ss.song.filename);
+
const [selectedSongId, setSelectedSongId] = useState
{noSongsHint}
@@ -125,7 +128,7 @@ export default function CurateSpecialEditor({ Select Song to Curate
+ Fehler: Song-Daten unvollständig. Bitte wählen Sie einen anderen Song. +
+