mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 05:32:18 +00:00
Merge branch 'dev-0.1.7' into 'master'
0.1.7 See merge request goscrobble/goscrobble-api!13
This commit is contained in:
commit
2dea7418bd
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue