Fix remaining type mismatches vs Python reference

- RotorSettings: Diversity float64→string, Energy float64→int, add Mood int and MoodEnergy string
- Ratings: Rating float64→int, add Week int and Day int
- MetatagArtistEntry: Remove Score float64 (not in Python), add PopularTracks []Track
- MusicHistoryItemData: Remove Progress float64 (not in Python)
This commit is contained in:
Mrixs committed 2026-10-18 12:57:21 +03:00
1 parent 577c4a418c
commit a9be10b5e5
4 files changed
+10 -6

No files matched your search

+3 -1
View File
@@ -162,8 +162,10 @@ func (a *Artist) DeList(data []byte, c ClientInterface) ([]Model, error) {
// Ratings represents artist ratings. // Ratings represents artist ratings.
type Ratings struct { type Ratings struct {
Rating float64 `json:"rating"` Rating int `json:"rating"`
Votes int `json:"votes"` Votes int `json:"votes"`
Week int `json:"week"`
Day int `json:"day"`
} }
// Counts represents artist counts. // Counts represents artist counts.
+1 -1
View File
@@ -133,7 +133,7 @@ type MetatagSortByValue struct {
type MetatagArtistEntry struct { type MetatagArtistEntry struct {
BaseModel BaseModel
Artist *Artist `json:"artist"` Artist *Artist `json:"artist"`
Score float64 `json:"score"` PopularTracks []Track `json:"popular_tracks"`
} }
// Genre represents a genre from the Yandex Music API. // Genre represents a genre from the Yandex Music API.
+1 -2
View File
@@ -110,8 +110,7 @@ type MusicHistoryItemData struct {
PlayContext *PlayContext `json:"play_context"` PlayContext *PlayContext `json:"play_context"`
Position int `json:"position"` Position int `json:"position"`
Duration int `json:"duration"` Duration int `json:"duration"`
Progress float64 `json:"progress"` }
}
// MusicHistoryItemID represents music history item ID. // MusicHistoryItemID represents music history item ID.
type MusicHistoryItemID struct { type MusicHistoryItemID struct {
+5 -2
View File
@@ -192,8 +192,11 @@ func (r *RotorStation) DeList(data []byte, client ClientInterface) ([]Model, err
// RotorSettings represents rotor station settings. // RotorSettings represents rotor station settings.
type RotorSettings struct { type RotorSettings struct {
BaseModel BaseModel
Diversity float64 `json:"diversity"` Language string `json:"language"`
Energy float64 `json:"energy"` Diversity string `json:"diversity"`
Mood int `json:"mood"`
Energy int `json:"energy"`
MoodEnergy string `json:"mood_energy"`
Acousticness float64 `json:"acousticness"` Acousticness float64 `json:"acousticness"`
Instrumentalness float64 `json:"instrumentalness"` Instrumentalness float64 `json:"instrumentalness"`
Live float64 `json:"live"` Live float64 `json:"live"`