- Fix spotify track duration
This commit is contained in:
Daniel Mason 2021-04-03 02:53:54 +13:00
parent bda7023949
commit f8bd321fbc
Signed by: idanoo
GPG Key ID: 387387CDBC02F132
4 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,7 @@ stages:
- bundle - bundle
variables: variables:
VERSION: 0.0.14 VERSION: 0.0.15
build-go: build-go:
image: golang:1.16.2 image: golang:1.16.2

View File

@ -1,3 +1,6 @@
# 0.0.15
- Fix spotify track duration
# 0.0.14 # 0.0.14
- Add duplicate cache checker for jellyfin/multiscrobbler - Add duplicate cache checker for jellyfin/multiscrobbler

View File

@ -182,7 +182,7 @@ func ParseSpotifyInput(userUUID string, data spotify.RecentlyPlayedItem, client
} }
// Insert track if not exist // 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) track, err := insertTrack(fulltrack.Name, length, "", fulltrack.ID.String(), album.Uuid, artists, tx)
if err != nil { if err != nil {
log.Printf("%+v", err) log.Printf("%+v", err)

View File

@ -447,7 +447,7 @@ func deleteSpotifyLink(w http.ResponseWriter, r *http.Request, u string, v strin
func fetchServerInfo(w http.ResponseWriter, r *http.Request) { func fetchServerInfo(w http.ResponseWriter, r *http.Request) {
info := ServerInfo{ info := ServerInfo{
Version: "0.0.14", Version: "0.0.15",
} }
js, _ := json.Marshal(&info) js, _ := json.Marshal(&info)