aome510 / spotify-player

A Spotify player in the terminal with full feature parity
MIT License
2.95k stars 132 forks source link

fix #464 by adding full date to display next to albums #474

Closed DOD-101 closed 1 week ago

DOD-101 commented 1 week ago

fixes #464

This PR removes the code previously responsible for filtering out duplicate album names, which had caused #464.

I have decided to not any additional text to signal the difference between the albums with the same name as: 1) That might cause confusion as the the actual name of the album 2) There is in my opinion no problem with having 2 entries with the same name 3) The official Spotify client also handles this situation in this manner

This PR however doesn't entirely fix the bug described in the issue, as it seems that this is an upstream issue. The Spotify API doesn't return both copies of the album "Revelations" by "Audioslave" and accordingly the Spotify Client has the exact same behavior as spotfiy_player. But now the two versions of Original Fire show up as they should.

Spotify response sample:

jq '.items[].name' response.json

"Revelations"
"Out of Exile"
"Audioslave"
"Original Fire"
"Original Fire"
"Doesn't Remind Me"
"Sessions @AOL Music - EP (Live)"
"Your Time Has Come"
"Like A Stone (Live from New York City)"
"Be Yourself"
"Audioslave Live on Hollywood Blvd."
"Show Me How To Live"
"Cochise"
"Chris Cornell (Deluxe Edition)"
"Live 8 (Live, July 2005)"
"Rock Clássico"
"90s Grunge"
"Canciones De Hace Un Tiempo - Rock"
"20 Top Rock Hits"
"Summer Rocks Best Buy Version"
"Miami Ibiza St. Tropez, Selected Housetunes Vol. 1"
aome510 commented 1 week ago

I have decided to not any additional text to signal the difference between the albums with the same name as:

That might cause confusion as the the actual name of the album There is in my opinion no problem with having 2 entries with the same name The official Spotify client also handles this situation in this manner

Maybe you can add album_type and render it in UI to better differentiate between albums of the same name. Official Spotify app does this.

Another approach would be updating the UI to render the full date instead of just year.

Otherwise, it will be confusing to me if I see duplicated entries.

DOD-101 commented 1 week ago

Here are the two options you suggested:

1) image

This one doesn't fix the issue of ambiguity you addressed.

2) image

This is, in my opinion, too much detail / text if you are just looking for an album.

+ two other options

3) image

This doesn't directly show the exact distinction between the two albums, but does at least show that there is some kind of difference.

4) Another possible solution would be to display the number of songs in an album. This is probably the most preferable solution, as it would in most cases signal a clear difference between the different versions without adding too much info or text that might not be useful to the end user just looking for an album.

The only problem I have with 4 is that SimplifiedAlbum doesn't contain tracks.

aome510 commented 1 week ago

Here are the two options you suggested:

image

This one doesn't fix the issue of ambiguity you addressed.

image

This is, in my opinion, too much detail / text if you are just looking for an album.

  • two other options

image

This doesn't directly show the exact distinction between the two albums, but does at least show that there is some kind of difference.

Another possible solution would be to display the number of songs in an album. This is probably the most preferable solution, as it would in most cases signal a clear difference between the different versions without adding too much info or text that might not be useful to the end user just looking for an album.

The only problem I have with 4 is that SimplifiedAlbum doesn't contain tracks.

Thanks for the investigation. Really helpful. I would probably go with 2 as it might also help with filtering in case you want to find specific album.