Skip to content

Stop iOS counting each track as played twice - #1714

Open
APIUM wants to merge 1 commit into
finamp-app:redesignfrom
APIUM:fix/apium/ios-scrobble-duplication
Open

Stop iOS counting each track as played twice#1714
APIUM wants to merge 1 commit into
finamp-app:redesignfrom
APIUM:fix/apium/ios-scrobble-duplication

Conversation

@APIUM

@APIUM APIUM commented Aug 6, 2026

Copy link
Copy Markdown
Member

This fix addresses incorrect lastfm scrobbling doing double scrobbles for tracks as reported in discord and in several tickets if I understand them correctly. I was able to reproduce this quite clearly on the sim, so the fix was fairly easy to verify.

I think the commit message communicates this pretty clearly:

On iOS the queue index advances before the position does, so the outgoing
track's end position was measured against the incoming track's runtime and read
as a repeat. Jellyfin logged a second play for a track that had just started,
and last.fm scrobbled it.

  • A repeat now also requires the track to have been current long enough to
    reach its end. The stale position survives an unpredictable number of events,
    so no position test alone can tell a repeat from a track change.
  • That test also means seeking forward and then looping the same track no
    longer records a listen.
  • A missing runtime made the loop check always true, so a track of unknown
    length counted as a repeat on any rewind.

Relates to #1172, #1604, #688.

On iOS the queue index advances before the position does, so the outgoing
track's end position was measured against the incoming track's runtime and read
as a repeat. Jellyfin logged a second play for a track that had just started,
and last.fm scrobbled it.

- A repeat now also requires the track to have been current long enough to
  reach its end. The stale position survives an unpredictable number of events,
  so no position test alone can tell a repeat from a track change.
- That test also means seeking forward and then looping the same track no
  longer records a listen.
- A missing runtime made the loop check always true, so a track of unknown
  length counted as a repeat on any rewind.

Relates to finamp-app#1172, finamp-app#1604, finamp-app#688.
@APIUM
APIUM force-pushed the fix/apium/ios-scrobble-duplication branch from a37aefb to 427c098 Compare August 6, 2026 07:41
@Chaphasilor Chaphasilor self-assigned this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants