1
0

For Song omit listeners and peak_listeners if they are zero.

This commit is contained in:
Alexander Andreev 2024-05-12 03:56:44 +04:00
parent a374dfd510
commit c8f71b205b
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

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