just fix that semicolon
This commit is contained in:
parent
33be872edc
commit
e2ffbf904f
3 changed files with 8 additions and 61 deletions
|
|
@ -1590,10 +1590,10 @@ class HiFiClient {
|
|||
const attr = inc.attributes ?? ({} as JsonApiIncludeAttributes);
|
||||
|
||||
let pic_id: string | null = null;
|
||||
const art_data = inc.relationships?.profileArt?.data;
|
||||
if (Array.isArray(art_data) && art_data.length > 0) {
|
||||
const artwork = artworks_map[art_data[0].id];
|
||||
const art_refs_artist = (() => { const d = inc.relationships?.profileArt?.data; 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) {
|
||||
const artwork = artworks_map[art_refs_artist[0].id];
|
||||
const files = artwork?.attributes?.files;
|
||||
|
|
|
|||
|
|
@ -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 || '')}`,
|
||||
|
|
@ -7,17 +7,17 @@
|
|||
"types": ["vite/client", "node", "@types/wicg-file-system-access"],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"!/*": ["node_modules/*"]
|
||||
"!/*": ["node_modules/*"],
|
||||
},
|
||||
"allowJs": true,
|
||||
"checkJs": false,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"ignoreDeprecations": "6.0",
|
||||
"ignoreDeprecations": "5.0",
|
||||
"skipLibCheck": true,
|
||||
"noEmit": true
|
||||
"noEmit": true,
|
||||
},
|
||||
"include": ["**/*.ts", "*.ts", "**/*.js", "*.js"],
|
||||
"exclude": ["**/node_modules/*"]
|
||||
"exclude": ["**/node_modules/*"],
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue