Skip to content

🎧 Your Personal Streaming Service

Make scrobble submits compatible with Last.FM specification

Deluanc9b119f0a40b
diff --git a/ui/src/audioplayer/Player.js b/ui/src/audioplayer/Player.js
index ad84e2f9a..f5612fa38 100644
--- a/ui/src/audioplayer/Player.js
+++ b/ui/src/audioplayer/Player.js
@@ -140,10 +140,17 @@ const Player = () => {
if (info.ended) {
document.title = 'Navidrome'
}
+
+ // See https://www.last.fm/api/scrobbling#when-is-a-scrobble-a-scrobble
const progress = (info.currentTime / info.duration) * 100
- if (isNaN(info.duration) || progress < 90) {
+ if (
+ isNaN(info.duration) ||
+ info.duration < 30 ||
+ (progress < 50 && info.currentTime < 240)
+ ) {
return
}
+
const item = queue.queue.find((item) => item.trackId === info.trackId)
if (item && !item.scrobbled) {
dispatch(scrobble(info.trackId, true))