Adding submission=true to scrobble call

This commit is contained in:
simojenki
2021-03-17 18:51:48 +11:00
parent ec4453fac4
commit c9543be3e7
2 changed files with 3 additions and 1 deletions

View File

@@ -548,7 +548,7 @@ export class Navidrome implements MusicService {
}, },
scrobble: async (id: string) => scrobble: async (id: string) =>
navidrome navidrome
.post(credentials, `/rest/scrobble`, { id }) .post(credentials, `/rest/scrobble`, { id, submission: true })
.then((_) => true) .then((_) => true)
.catch(() => false), .catch(() => false),
}; };

View File

@@ -2185,6 +2185,7 @@ describe("Navidrome", () => {
expect(mockPOST).toHaveBeenCalledWith(`${url}/rest/scrobble`, { expect(mockPOST).toHaveBeenCalledWith(`${url}/rest/scrobble`, {
params: { params: {
id, id,
submission: true,
...authParams, ...authParams,
}, },
headers, headers,
@@ -2216,6 +2217,7 @@ describe("Navidrome", () => {
expect(mockPOST).toHaveBeenCalledWith(`${url}/rest/scrobble`, { expect(mockPOST).toHaveBeenCalledWith(`${url}/rest/scrobble`, {
params: { params: {
id, id,
submission: true,
...authParams, ...authParams,
}, },
headers, headers,