fix(node-player): load cover art via axios with Bearer token
Cover images were loaded via <img src> which doesn't include the Authorization header, resulting in 401 from the Rust API. Now covers are fetched through axios as blobs and displayed via object URLs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,3 +52,9 @@ export async function preloadStream(trackSlug: string) {
|
||||
return await furumiApi.get(`/stream/${trackSlug}`, { responseType: 'blob' }).catch(() => null)
|
||||
}
|
||||
|
||||
export async function fetchCoverBlob(trackSlug: string): Promise<string | null> {
|
||||
const res = await furumiApi.get(`/tracks/${trackSlug}/cover`, { responseType: 'blob' }).catch(() => null)
|
||||
if (!res?.data) return null
|
||||
return URL.createObjectURL(res.data)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user