explodingcamera / subsonic-api

typescript/javascript library for interacting with subsonic-compatible apis
https://www.npmjs.com/package/subsonic-api
MIT License
10 stars 1 forks source link

Scrobble() method doesn't take into account submission param #3

Closed ChucKN0risK closed 1 year ago

ChucKN0risK commented 1 year ago

I'm creating a player component that gets the current song that is playing.

From Subsonic API I see I need to call the following methods in this exact order:

  1. stream(songId)
  2. scrobble(songId)
  3. getNowPlaying

The scrobble method needs to have the submission param set to false to add the a song in the playing queue.

Issue: the scrobble method doesn't seem to take into account the submission param. The id and time params work well though.

When directly using the Subsonic API in Postman with the same params everything works well.

My code: CleanShot 2023-09-13 at 12 47 14

The request in the browser doesn't send the submission param: CleanShot 2023-09-13 at 12 48 21

Did I miss something?

Thanks in advance ;)

EDIT After setting the submission value as a string it works. It may be coming from this line in your package :) CleanShot 2023-09-13 at 18 45 19 CleanShot 2023-09-13 at 18 42 38

explodingcamera commented 1 year ago

Thanks for the report, fixed in https://github.com/explodingcamera/subsonic-api/commit/cce5a4c7406e1be355eb658bde22a646238cb6ba