mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
impl scrobble & scrobble setting
works even in background thanks zustand
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
GetPlaylistParams,
|
||||
GetPlaylistsParams,
|
||||
GetTopSongsParams,
|
||||
ScrobbleParams,
|
||||
Search3Params,
|
||||
StreamParams,
|
||||
} from '@app/subsonic/params'
|
||||
@@ -223,6 +224,15 @@ export class SubsonicApiClient {
|
||||
return this.buildUrl('stream', params)
|
||||
}
|
||||
|
||||
//
|
||||
// Media annotation
|
||||
//
|
||||
|
||||
async scrobble(params: ScrobbleParams): Promise<SubsonicResponse<undefined>> {
|
||||
const xml = await this.apiGetXml('scrobble', params)
|
||||
return new SubsonicResponse<undefined>(xml, undefined)
|
||||
}
|
||||
|
||||
//
|
||||
// Searching
|
||||
//
|
||||
|
||||
@@ -100,6 +100,16 @@ export type StreamParams = {
|
||||
estimateContentLength?: boolean
|
||||
}
|
||||
|
||||
//
|
||||
// Media annotation
|
||||
//
|
||||
|
||||
export type ScrobbleParams = {
|
||||
id: string
|
||||
time?: Date
|
||||
submission?: boolean
|
||||
}
|
||||
|
||||
//
|
||||
// Searching
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user