From e6df5edd5d6e4b5292804819bd7a8261dbc1d7b5 Mon Sep 17 00:00:00 2001 From: Daniel Mason Date: Sat, 15 Jan 2022 19:32:29 +1300 Subject: [PATCH] 0.1.7 --- internal/goscrobble/ingress_navidrome.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/goscrobble/ingress_navidrome.go b/internal/goscrobble/ingress_navidrome.go index ae4f735f..92933805 100644 --- a/internal/goscrobble/ingress_navidrome.go +++ b/internal/goscrobble/ingress_navidrome.go @@ -139,7 +139,7 @@ func validateNavidromeConnection(url string, username string, hash string, salt // ParseNavidromeInput - Transform API data func ParseNavidromeInput(userUUID string, data NavidromeNowPlaying, ip net.IP, tx *sql.Tx) error { // Custom cache key - never log the same song twice in a row for now... (: - lastPlayedTitle := getUserLastPlayed(userUUID + fmt.Sprintf("%s", data.PlayerName)) + lastPlayedTitle := getUserLastPlayed(userUUID + fmt.Sprintf(":%d", data.PlayerID)) if lastPlayedTitle == data.Title+":"+data.Album { // If it matches last played song, skip it return nil @@ -177,7 +177,7 @@ func ParseNavidromeInput(userUUID string, data NavidromeNowPlaying, ip net.IP, t return errors.New("Failed to map track") } - setUserLastPlayed(userUUID+fmt.Sprintf("%s", data.PlayerName), data.Title+":"+data.Album) + setUserLastPlayed(userUUID+fmt.Sprintf(":%d", data.PlayerID), data.Title+":"+data.Album) return nil }