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

+5 -5
View File
@@ -8,7 +8,7 @@ import (
// Concert represents a concert from the Yandex Music API.
type Concert struct {
BaseModel
ID string `json:"id"`
ID JSONID `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Date string `json:"date"`
@@ -133,7 +133,7 @@ func (c *Concert) DeList(data []byte, client ClientInterface) ([]Model, error) {
// ConcertVenue represents a concert venue.
type ConcertVenue struct {
BaseModel
ID string `json:"id"`
ID JSONID `json:"id"`
Name string `json:"name"`
Address string `json:"address"`
City string `json:"city"`
@@ -145,7 +145,7 @@ type ConcertVenue struct {
// ConcertLocation represents a concert location.
type ConcertLocation struct {
BaseModel
ID string `json:"id"`
ID JSONID `json:"id"`
Name string `json:"name"`
City string `json:"city"`
Country string `json:"country"`
@@ -214,7 +214,7 @@ type ConcertMinPrice struct {
// ConcertTabConfig represents concert tab config.
type ConcertTabConfig struct {
BaseModel
ID string `json:"id"`
ID JSONID `json:"id"`
Title string `json:"title"`
Type string `json:"type"`
Active bool `json:"active"`
@@ -237,7 +237,7 @@ type ConcertSkeleton struct {
// ConcertSkeletonBlock represents a concert skeleton block.
type ConcertSkeletonBlock struct {
BaseModel
ID string `json:"id"`
ID JSONID `json:"id"`
Type string `json:"type"`
Title string `json:"title"`
Data json.RawMessage `json:"data"`