merge create and update playlist
This commit is contained in:
@@ -4,8 +4,10 @@ import "senan.xyz/g/gonic/model"
|
||||
|
||||
func NewPlaylist(p *model.Playlist) *Playlist {
|
||||
return &Playlist{
|
||||
ID: p.ID,
|
||||
Name: p.Name,
|
||||
Comment: p.Comment,
|
||||
ID: p.ID,
|
||||
Name: p.Name,
|
||||
Comment: p.Comment,
|
||||
Duration: "1",
|
||||
Public: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,5 +210,7 @@ type Playlist struct {
|
||||
Owner string `xml:"owner,attr" json:"owner,omitempty"`
|
||||
SongCount string `xml:"songCount,attr" json:"songCount,omitempty"`
|
||||
Created string `xml:"created,attr" json:"created,omitempty"`
|
||||
Duration string `xml:"duration,attr" json:"duration,omitempty"`
|
||||
Public bool `xml:"public,attr" json:"public,omitempty"`
|
||||
List []*TrackChild `xml:"entry" json:"entry,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user