For Song omit listeners and peak_listeners if they are zero.
This commit is contained in:
parent
a374dfd510
commit
c8f71b205b
@ -27,8 +27,8 @@ func (s *Song) MarshalJSON() ([]byte, error) {
|
|||||||
Artist string `json:"artist"`
|
Artist string `json:"artist"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
DurationMill int64 `json:"duration_msec,omitempty"`
|
DurationMill int64 `json:"duration_msec,omitempty"`
|
||||||
Listeners int64 `json:"listeners"`
|
Listeners int64 `json:"listeners,omitempty"`
|
||||||
PeakListeners int64 `json:"peak_listeners"`
|
PeakListeners int64 `json:"peak_listeners,omitempty"`
|
||||||
StartAt string `json:"start_at"`
|
StartAt string `json:"start_at"`
|
||||||
}{
|
}{
|
||||||
Artist: s.Artist,
|
Artist: s.Artist,
|
||||||
|
Loading…
Reference in New Issue
Block a user