show full OpenSubsonic date where available

This commit is contained in:
Drew Weymouth
2024-12-23 17:23:26 -08:00
parent 37f678e5f3
commit ff3b1addf8
8 changed files with 108 additions and 20 deletions
+15 -2
View File
@@ -32,6 +32,12 @@ const (
ReleaseTypeSpokenWord ReleaseType = 0x8000
)
type ItemDate struct {
Year *int
Month *int
Day *int
}
type Album struct {
ID string
CoverArtID string
@@ -39,14 +45,21 @@ type Album struct {
Duration int
ArtistIDs []string
ArtistNames []string
Year int
ReissueYear int
Date ItemDate
ReissueDate ItemDate
Genres []string
TrackCount int
Favorite bool
ReleaseTypes ReleaseTypes
}
func (a *Album) YearOrZero() int {
if a.Date.Year != nil {
return *a.Date.Year
}
return 0
}
type AlbumWithTracks struct {
Album
Tracks []*Track