🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Omit empty fields from Native API responses
Deluan519c89345eba
diff --git a/model/album.go b/model/album.goindex 7b32a6265..f79e57369 100644--- a/model/album.go+++ b/model/album.go@@ -17,22 +17,22 @@ type Album struct {MaxYear int `json:"maxYear"`MinYear int `json:"minYear"`Compilation bool `json:"compilation"`- Comment string `json:"comment"`+ Comment string `json:"comment,omitempty"`SongCount int `json:"songCount"`Duration float32 `json:"duration"`Size int64 `json:"size"`Genre string `json:"genre"`FullText string `json:"fullText"`- SortAlbumName string `json:"sortAlbumName"`- SortArtistName string `json:"sortArtistName"`- SortAlbumArtistName string `json:"sortAlbumArtistName"`+ SortAlbumName string `json:"sortAlbumName,omitempty"`+ SortArtistName string `json:"sortArtistName,omitempty"`+ SortAlbumArtistName string `json:"sortAlbumArtistName,omitempty"`OrderAlbumName string `json:"orderAlbumName"`OrderAlbumArtistName string `json:"orderAlbumArtistName"`- CatalogNum string `json:"catalogNum"`- MbzAlbumID string `json:"mbzAlbumId" orm:"column(mbz_album_id)"`- MbzAlbumArtistID string `json:"mbzAlbumArtistId" orm:"column(mbz_album_artist_id)"`- MbzAlbumType string `json:"mbzAlbumType"`- MbzAlbumComment string `json:"mbzAlbumComment"`+ CatalogNum string `json:"catalogNum,omitempty"`+ MbzAlbumID string `json:"mbzAlbumId,omitempty" orm:"column(mbz_album_id)"`+ MbzAlbumArtistID string `json:"mbzAlbumArtistId,omitempty" orm:"column(mbz_album_artist_id)"`+ MbzAlbumType string `json:"mbzAlbumType,omitempty"`+ MbzAlbumComment string `json:"mbzAlbumComment,omitempty"`CreatedAt time.Time `json:"createdAt"`UpdatedAt time.Time `json:"updatedAt"`}diff --git a/model/artist.go b/model/artist.goindex cb200c4fa..86e5f604e 100644--- a/model/artist.go+++ b/model/artist.go@@ -10,15 +10,15 @@ type Artist struct {AlbumCount int `json:"albumCount"`SongCount int `json:"songCount"`FullText string `json:"fullText"`- SortArtistName string `json:"sortArtistName"`+ SortArtistName string `json:"sortArtistName,omitempty"`OrderArtistName string `json:"orderArtistName"`Size int64 `json:"size"`- MbzArtistID string `json:"mbzArtistId" orm:"column(mbz_artist_id)"`- Biography string `json:"biography"`- SmallImageUrl string `json:"smallImageUrl"`- MediumImageUrl string `json:"mediumImageUrl"`- LargeImageUrl string `json:"largeImageUrl"`- ExternalUrl string `json:"externalUrl" orm:"column(external_url)"`+ MbzArtistID string `json:"mbzArtistId,omitempty" orm:"column(mbz_artist_id)"`+ Biography string `json:"biography,omitempty"`+ SmallImageUrl string `json:"smallImageUrl,omitempty"`+ MediumImageUrl string `json:"mediumImageUrl,omitempty"`+ LargeImageUrl string `json:"largeImageUrl,omitempty"`+ ExternalUrl string `json:"externalUrl,omitempty" orm:"column(external_url)"`SimilarArtists Artists `json:"-" orm:"-"`ExternalInfoUpdatedAt time.Time `json:"externalInfoUpdatedAt"`}diff --git a/model/mediafile.go b/model/mediafile.goindex f65f09165..59afe4f81 100644--- a/model/mediafile.go+++ b/model/mediafile.go@@ -21,7 +21,7 @@ type MediaFile struct {HasCoverArt bool `json:"hasCoverArt"`TrackNumber int `json:"trackNumber"`DiscNumber int `json:"discNumber"`- DiscSubtitle string `json:"discSubtitle"`+ DiscSubtitle string `json:"discSubtitle,omitempty"`Year int `json:"year"`Size int64 `json:"size"`Suffix string `json:"suffix"`@@ -29,24 +29,24 @@ type MediaFile struct {BitRate int `json:"bitRate"`Genre string `json:"genre"`FullText string `json:"fullText"`- SortTitle string `json:"sortTitle"`- SortAlbumName string `json:"sortAlbumName"`- SortArtistName string `json:"sortArtistName"`- SortAlbumArtistName string `json:"sortAlbumArtistName"`+ SortTitle string `json:"sortTitle,omitempty"`+ SortAlbumName string `json:"sortAlbumName,omitempty"`+ SortArtistName string `json:"sortArtistName,omitempty"`+ SortAlbumArtistName string `json:"sortAlbumArtistName,omitempty"`OrderAlbumName string `json:"orderAlbumName"`OrderArtistName string `json:"orderArtistName"`OrderAlbumArtistName string `json:"orderAlbumArtistName"`Compilation bool `json:"compilation"`- Comment string `json:"comment"`- Lyrics string `json:"lyrics"`+ Comment string `json:"comment,omitempty"`+ Lyrics string `json:"lyrics,omitempty"`Bpm int `json:"bpm,omitempty"`- CatalogNum string `json:"catalogNum"`- MbzTrackID string `json:"mbzTrackId" orm:"column(mbz_track_id)"`- MbzAlbumID string `json:"mbzAlbumId" orm:"column(mbz_album_id)"`- MbzArtistID string `json:"mbzArtistId" orm:"column(mbz_artist_id)"`- MbzAlbumArtistID string `json:"mbzAlbumArtistId" orm:"column(mbz_album_artist_id)"`- MbzAlbumType string `json:"mbzAlbumType"`- MbzAlbumComment string `json:"mbzAlbumComment"`+ CatalogNum string `json:"catalogNum,omitempty"`+ MbzTrackID string `json:"mbzTrackId,omitempty" orm:"column(mbz_track_id)"`+ MbzAlbumID string `json:"mbzAlbumId,omitempty" orm:"column(mbz_album_id)"`+ MbzArtistID string `json:"mbzArtistId,omitempty" orm:"column(mbz_artist_id)"`+ MbzAlbumArtistID string `json:"mbzAlbumArtistId,omitempty" orm:"column(mbz_album_artist_id)"`+ MbzAlbumType string `json:"mbzAlbumType,omitempty"`+ MbzAlbumComment string `json:"mbzAlbumComment,omitempty"`CreatedAt time.Time `json:"createdAt"` // Time this entry was created in the DBUpdatedAt time.Time `json:"updatedAt"` // Time of file last update (mtime)}