Omit empty Genre attributes

This commit is contained in:
Deluan 2023-12-27 12:44:25 -05:00 committed by Joe Stump
parent 5c36d42333
commit dd01263ae0
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -1,10 +1,10 @@
package model
type Genre struct {
ID string `structs:"id" json:"id"`
ID string `structs:"id" json:"id,omitempty" toml:"id,omitempty" yaml:"id,omitempty"`
Name string `structs:"name" json:"name"`
SongCount int `structs:"-" json:"-"`
AlbumCount int `structs:"-" json:"-"`
SongCount int `structs:"-" json:"-" toml:"-" yaml:"-"`
AlbumCount int `structs:"-" json:"-" toml:"-" yaml:"-"`
}
type Genres []Genre