diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d68b9a0..4c23cc07 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ stages: - bundle variables: - VERSION: 0.0.14 + VERSION: 0.0.15 build-go: image: golang:1.16.2 diff --git a/docs/changelog.md b/docs/changelog.md index a2b9a183..58422c80 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,6 @@ +# 0.0.15 +- Fix spotify track duration + # 0.0.14 - Add duplicate cache checker for jellyfin/multiscrobbler diff --git a/internal/goscrobble/ingress_spotify.go b/internal/goscrobble/ingress_spotify.go index 0c262599..1410d0db 100644 --- a/internal/goscrobble/ingress_spotify.go +++ b/internal/goscrobble/ingress_spotify.go @@ -182,7 +182,7 @@ func ParseSpotifyInput(userUUID string, data spotify.RecentlyPlayedItem, client } // Insert track if not exist - length := int(fulltrack.Duration / 60) + length := int(fulltrack.Duration / 1000) track, err := insertTrack(fulltrack.Name, length, "", fulltrack.ID.String(), album.Uuid, artists, tx) if err != nil { log.Printf("%+v", err) diff --git a/internal/goscrobble/server.go b/internal/goscrobble/server.go index cf146388..04c55189 100644 --- a/internal/goscrobble/server.go +++ b/internal/goscrobble/server.go @@ -447,7 +447,7 @@ func deleteSpotifyLink(w http.ResponseWriter, r *http.Request, u string, v strin func fetchServerInfo(w http.ResponseWriter, r *http.Request) { info := ServerInfo{ - Version: "0.0.14", + Version: "0.0.15", } js, _ := json.Marshal(&info)