- 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

@ -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)

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) {
info := ServerInfo{
Version: "0.0.14",
Version: "0.0.15",
}
js, _ := json.Marshal(&info)