Skip to content

Commit

Permalink
fix(plaxt): skip scrobbling if nothing changed
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyXiang committed Mar 9, 2022
1 parent 36315f1 commit 9c7ab8d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions handler/plex.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,12 @@ func (c *PlexClient) syncTimelineWithPlaxt(r *http.Request, user *plexUser) {
}
session.lastEvent = event
session.progress = progress
if shouldUpdate, shouldScrobble := session.Check(c.sessions[sessionKey]); shouldUpdate {
shouldUpdate, shouldScrobble := session.Check(c.sessions[sessionKey])
if shouldUpdate {
c.sessions[sessionKey] = session
if !shouldScrobble {
return
}
}
if !shouldScrobble {
return
}

serverIdentifier := c.getServerIdentifier()
Expand Down

0 comments on commit 9c7ab8d

Please sign in to comment.