Add Bandcamp search and Listening Room page
Implement Bandcamp search service with autocomplete API and HTML scraping fallback. Add /api/bandcamp/search and /api/bandcamp/embed endpoints. Create Listening Room page with search, embedded player, and queue management. Add navigation entry and Bandcamp link on recommendation cards.
This commit is contained in:
@@ -211,4 +211,30 @@ export const createBillingPortal = () =>
|
||||
export const getBillingStatus = () =>
|
||||
api.get<BillingStatusResponse>('/billing/status').then((r) => r.data)
|
||||
|
||||
// Bandcamp
|
||||
export interface BandcampResult {
|
||||
title: string
|
||||
artist: string
|
||||
art_url: string | null
|
||||
bandcamp_url: string
|
||||
item_type: string
|
||||
}
|
||||
|
||||
export interface BandcampEmbed {
|
||||
embed_url: string
|
||||
title: string
|
||||
artist: string
|
||||
art_url: string | null
|
||||
}
|
||||
|
||||
export async function searchBandcamp(query: string, type: string = 't'): Promise<BandcampResult[]> {
|
||||
const { data } = await api.get('/bandcamp/search', { params: { q: query, type } })
|
||||
return data
|
||||
}
|
||||
|
||||
export async function getBandcampEmbed(url: string): Promise<BandcampEmbed> {
|
||||
const { data } = await api.get('/bandcamp/embed', { params: { url } })
|
||||
return data
|
||||
}
|
||||
|
||||
export default api
|
||||
|
||||
Reference in New Issue
Block a user