mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-18 11:09:29 +02:00
jspf: add MB playlist extension, public field must be boolean
This commit is contained in:
parent
7a2fcc091e
commit
ed4c0aa1f8
2 changed files with 8 additions and 3 deletions
|
@ -149,6 +149,12 @@ func (b JSPFBackend) writeJSPF(tracks []jspf.Track) error {
|
||||||
Identifier: b.identifier,
|
Identifier: b.identifier,
|
||||||
Date: time.Now(),
|
Date: time.Now(),
|
||||||
Tracks: tracks,
|
Tracks: tracks,
|
||||||
|
Extension: map[string]any{
|
||||||
|
jspf.MusicBrainzPlaylistExtensionId: jspf.MusicBrainzPlaylistExtension{
|
||||||
|
LastModifiedAt: time.Now(),
|
||||||
|
Public: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,9 +51,8 @@ type MusicBrainzPlaylistExtension struct {
|
||||||
// deleted, this field will be set to true and the copied_from field will not
|
// deleted, this field will be set to true and the copied_from field will not
|
||||||
// be returned.
|
// be returned.
|
||||||
CopiedFromDeleted bool `json:"copied_from_deleted,omitempty"`
|
CopiedFromDeleted bool `json:"copied_from_deleted,omitempty"`
|
||||||
// Indicates if this playlist is public or private. Must contain the value
|
// Indicates if this playlist is public or private.
|
||||||
// "true" or "false".
|
Public bool `json:"public,omitempty"`
|
||||||
Public string `json:"public,omitempty"`
|
|
||||||
// The timestamp for when this playlist was last modified.
|
// The timestamp for when this playlist was last modified.
|
||||||
LastModifiedAt time.Time `json:"last_modified_at,omitempty"`
|
LastModifiedAt time.Time `json:"last_modified_at,omitempty"`
|
||||||
// This dict allows a playlist creator to submit additional track metadata
|
// This dict allows a playlist creator to submit additional track metadata
|
||||||
|
|
Loading…
Add table
Reference in a new issue