Repository: aome510/spotify-player (language: rust)

Issue:
Specifically cannot play 'Boards of Canada - Turquoise Hexagon Sun' within player
**Describe the bug**
Playing a specific song if in a playlist or liked songs, will refuse to play if requested to play from the terminal player view, but when playing it from an external spotify client it works.

**To Reproduce**
1. Add the song 'Boards of Canada - Turquoise Hexagon Sun' to a playlist
2. Play it from spotify-player

**Expected behavior**
The song plays.

**Log and backtrace**
When playing from spotify-player, the log just says it tries to play it:
```
2023-11-08T17:03:15.071059Z  INFO client_request{request=Player(StartPlayback(Context(Playlist(PlaylistId("1u2stAfUt4B546W380hjD9")), Some(Uri("spotify:track:7F3MjS1b1xHeaeXyBTvCE0"))), None))}: spotify_player::client: successfully handled the client request, took: 606ms
```
Nothing actually happens.

*However*, if i play the same song from the official spotify client, and attempt to connect to it from spotify-player, both clients die:
```
2023-11-08T17:01:45.676926Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:45.709484Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:45.741919Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:45.774161Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:45.806400Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:45.838607Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:45.870821Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:45.903078Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:45.935267Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:45.967422Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:45.999648Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
2023-11-08T17:01:46.031895Z  WARN spotify_player::ui::playback: Got a non-track playable item: None
```

**Environment**

- Application version: 0.15.2
- Application features: alsa backend, notify, lyrics and media control

**Additional context**
To re-iterate, Playing this song from spotify_player does nothing. Playing this song from the official spotify client connected to spotify_player plays as normal. Playing this song from spotify_player connected to the official spotify client causes both ends to die, as seen in the log above.



Discussion / hints:
fire emoji
cannot reproduce, all `Boards of Canada - Turquoise Hexagon Sun` work for me. What is the album of the song?
 
<img width="1427" alt="image" src="https://github.com/aome510/spotify-player/assets/40011582/ad4fc09f-a146-4122-88a7-3b5d5ec74c15">

Correct album. The description of my bug specifically and clearly states to put the song in a playlist first then play it from that playlist.
My picture shows playlist named test not an album
Okay.. i guess this song just hates me.

Fix patch:
diff --git a/spotify_player/src/state/model.rs b/spotify_player/src/state/model.rs
index 5a59a984..2b2ef9ec 100644
--- a/spotify_player/src/state/model.rs
+++ b/spotify_player/src/state/model.rs
@@ -254,8 +254,12 @@ impl Track {
     /// tries to convert from a `rspotify_model::SimplifiedTrack` into `Track`
     pub fn try_from_simplified_track(track: rspotify_model::SimplifiedTrack) -> Option<Self> {
         if track.is_playable.unwrap_or(true) {
+            let id = match track.linked_from {
+                Some(d) => d.id,
+                None => track.id?,
+            };
             Some(Self {
-                id: track.id?,
+                id,
                 name: track.name,
                 artists: from_simplified_artists_to_artists(track.artists),
                 album: None,
@@ -271,8 +275,12 @@ impl Track {
     /// tries to convert from a `rspotify_model::FullTrack` into `Track`
     pub fn try_from_full_track(track: rspotify_model::FullTrack) -> Option<Self> {
         if track.is_playable.unwrap_or(true) {
+            let id = match track.linked_from {
+                Some(d) => d.id,
+                None => track.id?,
+            };
             Some(Self {
-                id: track.id?,
+                id,
                 name: track.name,
                 artists: from_simplified_artists_to_artists(track.artists),
                 album: Album::try_from_simplified_album(track.album),


Test patch: