[PR #286] [MERGED] use track's id of linked_from if exists #700

Closed
opened 2026-03-02 23:49:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/286
Author: @aome510
Created: 11/12/2023
Status: Merged
Merged: 11/12/2023
Merged by: @aome510

Base: masterHead: use-linked-from-id-for-tracks


📝 Commits (1)

  • 85a203c use track's id of linked_from if exists

📊 Changes

1 file changed (+10 additions, -2 deletions)

View changed files

📝 spotify_player/src/state/model.rs (+10 -2)

📄 Description

Resolves #285
Resolves #282

Spotify uses Track Relinking to re-link a track to a different version of the same track if it's unavailable in user's market while the other version is available.

Because of this relinking process, the linked track's ID is returned by the Spotify APIs instead of the original track's ID. This makes starting a playback in a context (e.g album, playlist, etc) with the linked track's ID failed because Spotify cannot find a track with that ID in the context.

This PR updates the track conversion code to use the original track's ID if it's relinked.


🔄 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/aome510/spotify-player/pull/286 **Author:** [@aome510](https://github.com/aome510) **Created:** 11/12/2023 **Status:** ✅ Merged **Merged:** 11/12/2023 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `use-linked-from-id-for-tracks` --- ### 📝 Commits (1) - [`85a203c`](https://github.com/aome510/spotify-player/commit/85a203c8d81105d68b072328e4bdde83237d5c39) use track's id of `linked_from` if exists ### 📊 Changes **1 file changed** (+10 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `spotify_player/src/state/model.rs` (+10 -2) </details> ### 📄 Description Resolves #285 Resolves #282 Spotify uses [Track Relinking](https://developer.spotify.com/documentation/web-api/concepts/track-relinking) to re-link a track to a different version of the same track if it's unavailable in user's market while the other version is available. Because of this relinking process, the linked track's ID is returned by the Spotify APIs instead of the original track's ID. This makes starting a playback in a context (e.g album, playlist, etc) with the linked track's ID failed because Spotify cannot find a track with that ID in the context. This PR updates the track conversion code to use the original track's ID if it's relinked. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:49:26 +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/spotify-player#700
No description provided.