Fix R128 and remaining ID fields to accept both JSON types

- Track.R128 and TrackShort.R128: float64 → JSONR128 (accepts both JSON number and object)
- All remaining primary ID fields: string → JSONID (accepts both JSON string and number)
  Fixed in: account, artist, clip, concert, feed, label, landing, metatag,
  music_history, pin, queue, radio, search, settings, supplement
This commit is contained in:
Mrixs committed 2026-10-18 11:01:26 +03:00
1 parent d0173f795d
commit dbb823ade3
18 files changed
+75 -44

No files matched your search

+4 -4
View File
@@ -68,7 +68,7 @@ func (mh *MusicHistory) DeList(data []byte, client ClientInterface) ([]Model, er
// MusicHistoryTab represents a music history tab.
type MusicHistoryTab struct {
BaseModel
ID string `json:"id"`
ID JSONID `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Icon string `json:"icon"`
@@ -79,7 +79,7 @@ type MusicHistoryTab struct {
// MusicHistoryGroup represents a music history group.
type MusicHistoryGroup struct {
BaseModel
ID string `json:"id"`
ID JSONID `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Items []MusicHistoryItem `json:"items"`
@@ -89,7 +89,7 @@ type MusicHistoryGroup struct {
// MusicHistoryItem represents a music history item.
type MusicHistoryItem struct {
BaseModel
ID string `json:"id"`
ID JSONID `json:"id"`
Type string `json:"type"` // "track", "album", "artist", "playlist"
Track *Track `json:"track"`
Album *Album `json:"album"`
@@ -116,7 +116,7 @@ type MusicHistoryItemData struct {
// MusicHistoryItemID represents music history item ID.
type MusicHistoryItemID struct {
BaseModel
ID string `json:"id"`
ID JSONID `json:"id"`
Type string `json:"type"`
}