just fix that semicolon

This commit is contained in:
uimaxbai 2026-04-22 21:41:53 +01:00
parent 33be872edc
commit e2ffbf904f
3 changed files with 8 additions and 61 deletions

View file

@ -1590,10 +1590,10 @@ class HiFiClient {
const attr = inc.attributes ?? ({} as JsonApiIncludeAttributes); const attr = inc.attributes ?? ({} as JsonApiIncludeAttributes);
let pic_id: string | null = null; let pic_id: string | null = null;
const art_data = inc.relationships?.profileArt?.data; const art_refs_artist = (() => {
if (Array.isArray(art_data) && art_data.length > 0) { const d = inc.relationships?.profileArt?.data;
const artwork = artworks_map[art_data[0].id]; return Array.isArray(d) ? d : d ? [d as JsonApiRef] : [];
const art_refs_artist = (() => { const d = inc.relationships?.profileArt?.data; return Array.isArray(d) ? d : d ? [d as JsonApiRef] : []; })(); })();
if (art_refs_artist.length > 0) { if (art_refs_artist.length > 0) {
const artwork = artworks_map[art_refs_artist[0].id]; const artwork = artworks_map[art_refs_artist[0].id];
const files = artwork?.attributes?.files; const files = artwork?.attributes?.files;

View file

@ -1,53 +0,0 @@
@@ -2097,45 +2185,46 @@
offset,
countryCode: this.#countryCode,
},
signal,
openApiToken
);
- return HiFiClient.#jsonResponse({ version: HiFiClient.API_VERSION, data: fallback });
+ return HiFiClient.#jsonResponse({ version: HiFiClient.API_VERSION, data: parseOpenApiSearch(fallback) });
}
const openApiToken = await this.getOpenApiToken(signal);
+ const includeAll = 'albums.artists,albums.coverArt,artists.profileArt,playlists.coverArt,tracks.albums,tracks.albums.coverArt,tracks.artists,videos.artists,videos.image';
const mapping: Array<[string | undefined, string, Params]> = [
[
q,
`https://openapi.tidal.com/v2/searchResults/${encodeURIComponent(q || '')}`,
{
limit,
offset,
- include: 'albums,artists,tracks,videos,playlists,topHits',
+ include: includeAll,
countryCode: this.#countryCode,
},
],
[
s,
`https://openapi.tidal.com/v2/searchResults/${encodeURIComponent(s || '')}`,
- { limit, offset, include: 'tracks', countryCode: this.#countryCode },
+ { limit, offset, include: includeAll, countryCode: this.#countryCode },
],
[
a,
`https://openapi.tidal.com/v2/searchResults/${encodeURIComponent(a || '')}`,
- { limit, offset, include: 'artists,tracks', countryCode: this.#countryCode },
+ { limit, offset, include: includeAll, countryCode: this.#countryCode },
],
[
al,
`https://openapi.tidal.com/v2/searchResults/${encodeURIComponent(al || '')}`,
- { limit, offset, include: 'albums', countryCode: this.#countryCode },
+ { limit, offset, include: includeAll, countryCode: this.#countryCode },
],
[
v,
`https://openapi.tidal.com/v2/searchResults/${encodeURIComponent(v || '')}`,
- { limit, offset, include: 'videos', countryCode: this.#countryCode },
+ { limit, offset, include: includeAll, countryCode: this.#countryCode },
],
[
p,
`https://openapi.tidal.com/v2/searchResults/${encodeURIComponent(p || '')}`,

View file

@ -7,17 +7,17 @@
"types": ["vite/client", "node", "@types/wicg-file-system-access"], "types": ["vite/client", "node", "@types/wicg-file-system-access"],
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"!/*": ["node_modules/*"] "!/*": ["node_modules/*"],
}, },
"allowJs": true, "allowJs": true,
"checkJs": false, "checkJs": false,
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"verbatimModuleSyntax": true, "verbatimModuleSyntax": true,
"ignoreDeprecations": "6.0", "ignoreDeprecations": "5.0",
"skipLibCheck": true, "skipLibCheck": true,
"noEmit": true "noEmit": true,
}, },
"include": ["**/*.ts", "*.ts", "**/*.js", "*.js"], "include": ["**/*.ts", "*.ts", "**/*.js", "*.js"],
"exclude": ["**/node_modules/*"] "exclude": ["**/node_modules/*"],
} }