Make duration adhere to the spec

This commit is contained in:
Sumner Evans
2020-06-15 19:07:24 -06:00
committed by Senan Kelly
parent 9440bf3696
commit cadc02f923
2 changed files with 2 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ func NewPlaylist(p *db.Playlist) *Playlist {
ID: p.ID, ID: p.ID,
Name: p.Name, Name: p.Name,
Comment: p.Comment, Comment: p.Comment,
Duration: "1", Duration: 1,
Public: true, Public: true,
Created: p.CreatedAt, Created: p.CreatedAt,
} }

View File

@@ -233,7 +233,7 @@ type Playlist struct {
Owner string `xml:"owner,attr" json:"owner"` Owner string `xml:"owner,attr" json:"owner"`
SongCount int `xml:"songCount,attr" json:"songCount"` SongCount int `xml:"songCount,attr" json:"songCount"`
Created time.Time `xml:"created,attr" json:"created"` Created time.Time `xml:"created,attr" json:"created"`
Duration string `xml:"duration,attr" json:"duration,omitempty"` Duration int `xml:"duration,attr" json:"duration,omitempty"`
Public bool `xml:"public,attr" json:"public,omitempty"` Public bool `xml:"public,attr" json:"public,omitempty"`
List []*TrackChild `xml:"entry" json:"entry"` List []*TrackChild `xml:"entry" json:"entry"`
} }