added top songs to artist view

This commit is contained in:
austinried
2021-07-17 10:39:18 +09:00
parent 62a721ba4d
commit de342c0830
10 changed files with 168 additions and 119 deletions

View File

@@ -10,6 +10,7 @@ import {
GetCoverArtParams,
GetIndexesParams,
GetMusicDirectoryParams,
GetTopSongsParams,
StreamParams,
} from '@app/subsonic/params'
import {
@@ -22,6 +23,7 @@ import {
GetArtistsResponse,
GetIndexesResponse,
GetMusicDirectoryResponse,
GetTopSongsResponse,
SubsonicResponse,
} from '@app/subsonic/responses'
import { Server } from '@app/models/settings'
@@ -165,6 +167,11 @@ export class SubsonicApiClient {
return new SubsonicResponse<GetArtistResponse>(xml, new GetArtistResponse(xml))
}
async getTopSongs(params: GetTopSongsParams): Promise<SubsonicResponse<GetTopSongsResponse>> {
const xml = await this.apiGetXml('getTopSongs', params)
return new SubsonicResponse<GetTopSongsResponse>(xml, new GetTopSongsResponse(xml))
}
//
// Album/song lists
//