[GH-ISSUE #106] Wrong album is shown if an album in the Album library was viewed previously #63

Closed
opened 2026-02-28 14:46:43 +03:00 by kerem · 6 comments
Owner

Originally created by @jfaltis on GitHub (Oct 24, 2019).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/106

Steps to reproduce

  • launch spotify-tui
  • select an album of your Albums in the Library
  • select an artist of your Library and one of the artists albums
Originally created by @jfaltis on GitHub (Oct 24, 2019). Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/106 Steps to reproduce - launch `spotify-tui` - select an album of your Albums in the Library - select an artist of your Library and one of the artists albums
kerem closed this issue 2026-02-28 14:46:43 +03:00
Author
Owner

@sputnick1124 commented on GitHub (Nov 3, 2019):

It seems that when an album is selected from an artist, It's track list is overwritten immediately by the track listing of the most recently viewed album from the user's saved albums list.

github.com/Rigellute/spotify-tui@0379b46fab/src/handlers/artist_albums.rs (L29-L49)

@Rigellute, is there a reason for this second block? Going through the commit history, it seems that the second block in that artist_albums handler was an earlier prototype which should perhaps have been removed in a later commit when the actual artist results were fleshed out?

Early commit:
github.com/Rigellute/spotify-tui@e4f446535a (diff-f935c27bae)
Later commit:
github.com/Rigellute/spotify-tui@28e9ee28fd (diff-f935c27bae)

<!-- gh-comment-id:549096030 --> @sputnick1124 commented on GitHub (Nov 3, 2019): It seems that when an album is selected from an artist, It's track list is overwritten immediately by the track listing of the most recently viewed album from the user's saved albums list. https://github.com/Rigellute/spotify-tui/blob/0379b46fab2c3a7ac85234f437e635c85998e4ba/src/handlers/artist_albums.rs#L29-L49 @Rigellute, is there a reason for this second block? Going through the commit history, it seems that the second block in that `artist_albums` handler was an earlier prototype which should perhaps have been removed in a later commit when the actual artist results were fleshed out? Early commit: https://github.com/Rigellute/spotify-tui/commit/e4f446535a838141e7ccf137f6d7b5559fa1810e#diff-f935c27baecb8324a6640180293f9d9eR27-R36 Later commit: https://github.com/Rigellute/spotify-tui/commit/28e9ee28fd0933d95f8ed675f551e07cbd8b8a4e#diff-f935c27baecb8324a6640180293f9d9eR29-R39
Author
Owner

@sputnick1124 commented on GitHub (Nov 3, 2019):

I should mention that the lines causing the issue in the artist_albums handler are an exact copy of the lines performing the same function in the album_list handler, which is what leads me to believe that perhaps this is leftover prototyping code.

Problematic code:
github.com/Rigellute/spotify-tui@0379b46fab/src/handlers/artist_albums.rs (L40-L49)
Copied code:
github.com/Rigellute/spotify-tui@0379b46fab/src/handlers/album_list.rs (L27-L36)

<!-- gh-comment-id:549096234 --> @sputnick1124 commented on GitHub (Nov 3, 2019): I should mention that the lines causing the issue in the `artist_albums` handler are an exact copy of the lines performing the same function in the `album_list` handler, which is what leads me to believe that perhaps this is leftover prototyping code. Problematic code: https://github.com/Rigellute/spotify-tui/blob/0379b46fab2c3a7ac85234f437e635c85998e4ba/src/handlers/artist_albums.rs#L40-L49 Copied code: https://github.com/Rigellute/spotify-tui/blob/0379b46fab2c3a7ac85234f437e635c85998e4ba/src/handlers/album_list.rs#L27-L36
Author
Owner

@sputnick1124 commented on GitHub (Nov 3, 2019):

I've got a branch with the fix implemented. I can submit a PR unless I'm missing something.

<!-- gh-comment-id:549172988 --> @sputnick1124 commented on GitHub (Nov 3, 2019): I've got a [branch](https://github.com/sputnick1124/spotify-tui/tree/106-wrong-album) with the fix implemented. I can submit a PR unless I'm missing something.
Author
Owner

@Rigellute commented on GitHub (Nov 3, 2019):

Great debugging @sputnick1124. You're right, this bug is a result of hacky prototyping. I really need to rethink and tidy things up.

I've gone through a few different approaches and it makes things confusing!

Please do PR your fix!

<!-- gh-comment-id:549174927 --> @Rigellute commented on GitHub (Nov 3, 2019): Great debugging @sputnick1124. You're right, this bug is a result of hacky prototyping. I really need to rethink and tidy things up. I've gone through a few different approaches and it makes things confusing! Please do PR your fix!
Author
Owner

@sputnick1124 commented on GitHub (Nov 4, 2019):

No worries! spotify-tui is obviously filling a hole and generating interest, so you're on to something good here. Working out the bugs and iterating to a good ultimate design is just part of the process.

https://github.com/Rigellute/spotify-tui/pull/130

<!-- gh-comment-id:549200720 --> @sputnick1124 commented on GitHub (Nov 4, 2019): No worries! `spotify-tui` is obviously filling a hole and generating interest, so you're on to something good here. Working out the bugs and iterating to a good ultimate design is just part of the process. https://github.com/Rigellute/spotify-tui/pull/130
Author
Owner

@Rigellute commented on GitHub (Nov 4, 2019):

#130 closes this

<!-- gh-comment-id:549366942 --> @Rigellute commented on GitHub (Nov 4, 2019): #130 closes this
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-tui#63
No description provided.