feat: add scan status and cover art endpoints
Track scanner status for the web API and Subsonic-compatible scan endpoints, add authenticated cover art serving, and wire album artwork into the web UI. Keep Subsonic auth limited to legacy password mode for now so behavior stays honest with the current bcrypt-based user storage.
This commit is contained in:
@@ -14,6 +14,7 @@ export type HomePayload = {
|
||||
title: string
|
||||
year: number
|
||||
trackCount: number
|
||||
coverArtId: string
|
||||
}>
|
||||
artists: Array<{
|
||||
id: string
|
||||
@@ -67,3 +68,8 @@ export async function fetchHome() {
|
||||
export async function fetchTracks() {
|
||||
return request<{ items: Track[] }>('/api/tracks')
|
||||
}
|
||||
|
||||
export function coverArtUrl(id: string) {
|
||||
const token = useSessionStore.getState().token
|
||||
return `${API_BASE}/api/cover-art/${id}${token ? `?token=${encodeURIComponent(token)}` : ''}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user