impl star/unstar starred state

This commit is contained in:
austinried
2021-08-09 18:05:20 +09:00
parent 19c862b983
commit 0a3d542156
5 changed files with 145 additions and 38 deletions

View File

@@ -15,6 +15,7 @@ import {
GetTopSongsParams,
ScrobbleParams,
Search3Params,
StarParams,
StreamParams,
} from '@app/subsonic/params'
import {
@@ -233,6 +234,16 @@ export class SubsonicApiClient {
return new SubsonicResponse<undefined>(xml, undefined)
}
async star(params: StarParams): Promise<SubsonicResponse<undefined>> {
const xml = await this.apiGetXml('star', params)
return new SubsonicResponse<undefined>(xml, undefined)
}
async unstar(params: StarParams): Promise<SubsonicResponse<undefined>> {
const xml = await this.apiGetXml('unstar', params)
return new SubsonicResponse<undefined>(xml, undefined)
}
//
// Searching
//