mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-16 04:00:38 +03:00
Don't send invalid scrobbles when clearing the player's queue
This commit is contained in:
parent
fb4eefced5
commit
e68b22ea5d
@ -103,7 +103,7 @@ const Player = () => {
|
||||
}
|
||||
|
||||
if (!scrobbled) {
|
||||
subsonic.scrobble(info.trackId, true, startTime)
|
||||
info.trackId && subsonic.scrobble(info.trackId, startTime)
|
||||
setScrobbled(true)
|
||||
}
|
||||
},
|
||||
|
@ -22,7 +22,7 @@ const url = (command, id, options) => {
|
||||
return `/rest/${command}?${params.toString()}`
|
||||
}
|
||||
|
||||
const scrobble = (id, submission = false, time) =>
|
||||
const scrobble = (id, time, submission = true) =>
|
||||
httpClient(
|
||||
url('scrobble', id, {
|
||||
...(submission && time && { time }),
|
||||
@ -30,7 +30,7 @@ const scrobble = (id, submission = false, time) =>
|
||||
})
|
||||
)
|
||||
|
||||
const nowPlaying = (id) => scrobble(id, false)
|
||||
const nowPlaying = (id) => scrobble(id, null, false)
|
||||
|
||||
const star = (id) => httpClient(url('star', id))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user