Fix int types in OpenSubsonic responses.

Refer to https://support.symfonium.app/t/symfonium-sync-crashes-when-tpos-is-not-an-int/4204
This commit is contained in:
Deluan
2024-05-01 13:57:11 -04:00
parent 7ab7b5df5e
commit 2c06a4234e
4 changed files with 39 additions and 14 deletions
+4 -4
View File
@@ -502,7 +502,7 @@ type ReplayGain struct {
}
type DiscTitle struct {
Disc int `xml:"disc,attr" json:"disc"`
Disc int32 `xml:"disc,attr" json:"disc"`
Title string `xml:"title,attr" json:"title"`
}
@@ -523,7 +523,7 @@ func marshalJSONArray[T any](v []T) ([]byte, error) {
}
type ItemDate struct {
Year int `xml:"year,attr,omitempty" json:"year,omitempty"`
Month int `xml:"month,attr,omitempty" json:"month,omitempty"`
Day int `xml:"day,attr,omitempty" json:"day,omitempty"`
Year int32 `xml:"year,attr,omitempty" json:"year,omitempty"`
Month int32 `xml:"month,attr,omitempty" json:"month,omitempty"`
Day int32 `xml:"day,attr,omitempty" json:"day,omitempty"`
}