mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
0.1.7 - Fix dupes
This commit is contained in:
parent
e6df5edd5d
commit
efabd1782c
@ -1,5 +1,6 @@
|
|||||||
# 0.1.7
|
# 0.1.7
|
||||||
- Fix navidrome logging 2x scrobbles if second player is paused
|
- Fix navidrome logging 2x scrobbles if second player is paused
|
||||||
|
- Fix jellyfin logging 2x scrobbles if 2 players are playing
|
||||||
|
|
||||||
# 0.1.6
|
# 0.1.6
|
||||||
- Allow UUID of 0 in artists/{uuid}/top to return site-wide stats
|
- Allow UUID of 0 in artists/{uuid}/top to return site-wide stats
|
||||||
|
@ -3,6 +3,7 @@ package goscrobble
|
|||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
@ -48,7 +49,7 @@ func ParseJellyfinInput(userUUID string, jf JellyfinRequest, ip net.IP, tx *sql.
|
|||||||
// fmt.Printf("%+v", jf)
|
// fmt.Printf("%+v", jf)
|
||||||
|
|
||||||
// Custom cache key - never log the same song twice in a row for now... (:
|
// Custom cache key - never log the same song twice in a row for now... (:
|
||||||
lastPlayedTitle := getUserLastPlayed(userUUID)
|
lastPlayedTitle := getUserLastPlayed(userUUID + fmt.Sprintf(":%s", jf.DeviceID))
|
||||||
if lastPlayedTitle == jf.Name+":"+jf.Album {
|
if lastPlayedTitle == jf.Name+":"+jf.Album {
|
||||||
// If it matches last played song, skip it
|
// If it matches last played song, skip it
|
||||||
return nil
|
return nil
|
||||||
@ -103,7 +104,7 @@ func ParseJellyfinInput(userUUID string, jf JellyfinRequest, ip net.IP, tx *sql.
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add cache key!
|
// Add cache key!
|
||||||
setUserLastPlayed(userUUID, jf.Name+":"+jf.Album)
|
setUserLastPlayed(userUUID+fmt.Sprintf(":%s", jf.DeviceID), jf.Name+":"+jf.Album)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user