home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.02k stars 2.75k forks source link

Media Browser Spotify recently played sorted alphabetically instead of recent, also shows dupes (0.115.0b0) #6843

Closed SeanPM5 closed 4 years ago

SeanPM5 commented 4 years ago

Checklist

The problem

Again this is sort of a gray area between frontend display issue or integration backend issue, so transfer to core repo if that is the case...

Media Browser for Spotify has a "Recently Played" category. You would expect a recently played to show your most recently played music at the top, but instead this is sorted alphabetically A-Z like all the other categories.

In this demonstration picture, Rick Astley's "Never Gonna Give You Up" was the most recently played and should appear at the top but instead appears in the middle. Also played it three times in a row to demonstrate another issue (IMO) - it shows "duplicates" if you happen to play a song on repeat multiple times.

image

I hope this doesn't ruin my recommendations forever hahah 🙈

Expected behavior

Steps to reproduce

Go to Spotify media browser -> Recently Played. They are sorted alphabetically rather than recently played.

Environment

State of relevant entities

Problem-relevant configuration

Javascript errors shown in your browser console/inspector

Additional information

frenck commented 4 years ago

Not sure if this is a backend or frontend problem, tagged it for the milestone for the frontend for now.

bramkragten commented 4 years ago

It is frontend, the items are sort alphabetically.

spacegaier commented 4 years ago

The duplicates are actually coming from the original Spotify payload in my case. Each have their own played_at value, so we could e.g. pick the newest entry and use only that and then sort by played_at.

bramkragten commented 4 years ago

The duplicates are actually coming from the original Spotify payload in my case. Each have their own played_at value, so we could e.g. pick the newest entry and use only that and then sort by played_at.

THAT would be backend.

zsarnett commented 4 years ago

https://github.com/home-assistant/frontend/pull/6886

We are going to move sorting initially to the backend