fix(api): use an instance for /recommendations
This commit is contained in:
parent
f2b8cdc812
commit
a385cb558a
1 changed files with 5 additions and 2 deletions
|
|
@ -56,11 +56,14 @@ export class LosslessAPI {
|
||||||
|
|
||||||
async fetchWithRetry(relativePath, options = {}) {
|
async fetchWithRetry(relativePath, options = {}) {
|
||||||
const type = options.type || 'api';
|
const type = options.type || 'api';
|
||||||
const instanceRoutes = ['/track', '/album/similar', '/artist/similar', '/video'];
|
const instanceRoutes = ['/track', '/album/similar', '/artist/similar', '/video', '/recommendations'];
|
||||||
|
|
||||||
if (window.allTidal == true || !instanceRoutes.some((route) => relativePath.startsWith(route))) {
|
if (window.allTidal == true || !instanceRoutes.some((route) => relativePath.startsWith(route))) {
|
||||||
try {
|
try {
|
||||||
console.log(relativePath);
|
if (import.meta.env.DEV) {
|
||||||
|
console.log(relativePath);
|
||||||
|
}
|
||||||
|
|
||||||
return await client.queryResponse(relativePath);
|
return await client.queryResponse(relativePath);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn(
|
console.warn(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue