mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 12:30:06 +02:00
optimize artist page load speed
This commit is contained in:
@@ -256,17 +256,18 @@ export const SubsonicController: InternalControllerEndpoint = {
|
||||
getAlbumArtistDetail: async (args) => {
|
||||
const { apiClientProps, query } = args;
|
||||
|
||||
const artistInfoRes = await ssApiClient(apiClientProps).getArtistInfo({
|
||||
query: {
|
||||
id: query.id,
|
||||
},
|
||||
});
|
||||
|
||||
const res = await ssApiClient(apiClientProps).getArtist({
|
||||
query: {
|
||||
id: query.id,
|
||||
},
|
||||
});
|
||||
const [artistInfoRes, res] = await Promise.all([
|
||||
ssApiClient(apiClientProps).getArtistInfo({
|
||||
query: {
|
||||
id: query.id,
|
||||
},
|
||||
}),
|
||||
ssApiClient(apiClientProps).getArtist({
|
||||
query: {
|
||||
id: query.id,
|
||||
},
|
||||
}),
|
||||
]);
|
||||
|
||||
if (res.status !== 200) {
|
||||
throw new Error('Failed to get album artist detail');
|
||||
|
||||
Reference in New Issue
Block a user