[PR #457] [MERGED] Workaround for Spotify API bug #469

Closed
opened 2026-02-27 20:24:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/457
Author: @m-torhan
Created: 2/1/2024
Status: Merged
Merged: 2/2/2024
Merged by: @ramsayleung

Base: masterHead: spotify-api-workaround


📝 Commits (1)

  • 6c15096 Workaround for Spotify API bug

📊 Changes

4 files changed (+43 additions, -4 deletions)

View changed files

📝 rspotify-model/src/artist.rs (+3 -1)
rspotify-model/src/data_type_patcher.rs (+28 -0)
📝 rspotify-model/src/image.rs (+6 -0)
📝 rspotify-model/src/lib.rs (+6 -3)

📄 Description

Description

https://github.com/ramsayleung/rspotify/issues/452 Due to Spotify API returning floats instead of uints for some fields of the Artist it cannot be parsed. This commit adds deserializing float values into u32 as a workaround.

Motivation and Context

Please also include relevant motivation and context.

Dependencies

None

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

Tested using https://github.com/aome510/spotify-player, after this fix the artist's page loaded successfully.

Is this change properly documented?

Yes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ramsayleung/rspotify/pull/457 **Author:** [@m-torhan](https://github.com/m-torhan) **Created:** 2/1/2024 **Status:** ✅ Merged **Merged:** 2/2/2024 **Merged by:** [@ramsayleung](https://github.com/ramsayleung) **Base:** `master` ← **Head:** `spotify-api-workaround` --- ### 📝 Commits (1) - [`6c15096`](https://github.com/ramsayleung/rspotify/commit/6c15096328e965791a75c12d4c6ed5be11c9fe90) Workaround for Spotify API bug ### 📊 Changes **4 files changed** (+43 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `rspotify-model/src/artist.rs` (+3 -1) ➕ `rspotify-model/src/data_type_patcher.rs` (+28 -0) 📝 `rspotify-model/src/image.rs` (+6 -0) 📝 `rspotify-model/src/lib.rs` (+6 -3) </details> ### 📄 Description ## Description https://github.com/ramsayleung/rspotify/issues/452 Due to Spotify API returning floats instead of uints for some fields of the Artist it cannot be parsed. This commit adds deserializing float values into u32 as a workaround. ## Motivation and Context Please also include relevant motivation and context. ## Dependencies None ## Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## How has this been tested? Tested using https://github.com/aome510/spotify-player, after this fix the artist's page loaded successfully. ## Is this change properly documented? Yes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:50 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rspotify#469
No description provided.