Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Show "Recently played" #88

Open
mr-manuel opened this issue Jul 2, 2023 · 12 comments
Open

Feature Request: Show "Recently played" #88

mr-manuel opened this issue Jul 2, 2023 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@mr-manuel
Copy link

Would it be possible to also show also the "Recently played" list from Spotify in the Spotty app?

Spotify app

grafik

LMS Spotty

grafik

@michaelherger michaelherger transferred this issue from michaelherger/librespot Jul 2, 2023
@michaelherger
Copy link
Owner

For whatever reason I've actually deliberately hidden it. See

Spotty-Plugin/OPML.pm

Lines 70 to 82 in a0d4534

# sort order for home menu items - -1 means hide item
my %homeItems = (
'made-for-x' => 1,
'podcast-recs-show-affinity-wrapper' => 5,
'NMF-NRFY' => 10,
'home-personalized[favorite-albums]' => 20,
'home-personalized[recommended-stations]' => 40,
'home-personalized[more-of-what-you-like]' => 100,
'uniquely-yours-shelf' => 200,
'recently-updated-playlists[0]' => -1,
'recently-updated-playlists' => -1,
'recently-played' => -1,
);

So feel free to change the line with -1 for recently-played to the weight you want to give it within that menu. I might want to review the choices I've done there at some point...

@michaelherger
Copy link
Owner

Looking at that list, and considering how overwhelmed I sometimes am by that menu, I might want to make this configurable.

@michaelherger michaelherger added the enhancement New feature or request label Jul 2, 2023
@michaelherger michaelherger self-assigned this Jul 2, 2023
@michaelherger
Copy link
Owner

Hmm... that's odd: the web UI would give a pretty different "Recently Played" view than the native app ("Zuletzt gehört" in German):

Bildschirmfoto 2023-07-02 um 13 17 00

Top is the browser view (which uses the API Spotty is using), bottom is the native app. I wouldn't get any recently listened tracks but only the "Weekly Mix" and some random Podcasts I can't remember ever having listened to. That won't be too helpful... maybe it's just a temporary issue on their end.

@mr-manuel
Copy link
Author

Thanks for your fast answers! If you make it configurable that would be great :-)

Somehow I have no "Recently played" even, if I enable it and reboot the whole system.

grafik

I'm using MS4H and the latest version of LMS:

grafik

@michaelherger
Copy link
Owner

The data is cached for 15 minutes if I remember correctly. You might have to wipe the cache or try again later.

@mr-manuel
Copy link
Author

I changed it 30 minutes ago, but no changes. Is this the right path /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/Spotty/OPML.pm? I found no other location for OPML.pm.

I also tried on another installation but have the same result, that it does not appear.

@mr-manuel
Copy link
Author

Maybe this was the case: ec11198

But I'm more interested to find the one played on my SmartPhone.

@michaelherger
Copy link
Owner

Please enable debug logging for plugin.spotty (see Settings/Advanced/Logging). Then look for log entries from Plugins::Spotty::API::Web::home. It should list the structure with all items found, before the filtering is applied. Would you find something for recently-played?

@mr-manuel
Copy link
Author

When I search for recently-played it displays only this:

[23-07-02 22:13:24.3640] Plugins::Spotty::API::Token::_logCommand (155) Trying to get access token: "/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64" -n "Squeezebox" -c "/var/lib/squeezeboxserver/cache/spotty/7c538783" -i "35d6b8d25b32xxxxxxxxxxxxxxxxxxxx" --disable-discovery --scope "user-read-private,user-follow-modify,user-follow-read,user-library-read,user-library-modify,user-top-read,user-read-recently-played,user-read-playback-state,user-modify-playback-state,playlist-read-private,playlist-read-collaborative,playlist-modify-public,playlist-modify-private" --save-token "/tmp/spt-cYFp8LGU"
                                href     => "https://api.spotify.com/v1/views/recently-played?content_limit=20&locale=en_us&country=IT×tamp=2023-07-02T22:10:00&types=album%2Cplaylist%2Cartist%2Cshow%2Cstation&limit=20&offset=0",
                          href => "https://api.spotify.com/v1/views/recently-played",
                          id => "recently-played",
                          name => "Recently played",
[23-07-02 22:13:28.0741] Plugins::Spotty::API::Web::__ANON__ (287) do {
  my $a = {
    content => {
          href     => "https://api.spotify.com/v1/views/desktop-home?content_limit=20&locale=en_us&country=IT&timestamp=2023-07-02T22:10:00&types=album%2Cplaylist%2Cartist%2Cshow%2Cstation&limit=20&offset=0",
          items    => [
                        {
                          content => {
                                href     => "https://api.spotify.com/v1/views/recently-played?content_limit=20&locale=en_us&country=IT&timestamp=2023-07-02T22:10:00&types=album%2Cplaylist%2Cartist%2Cshow%2Cstation&limit=20&offset=0",
                                items    => [],
                                limit    => 20,
                                "next"   => undef,
                                offset   => 0,
                                previous => undef,
                                total    => 0,
                              },
                          custom_fields => {},
                          external_urls => undef,
                          href => "https://api.spotify.com/v1/views/recently-played",
                          id => "recently-played",
                          images => [],
                          name => "Recently played",
                          rendering => "CAROUSEL",
                          tag_line => undef,
                          type => "view",
                        },
... (1.000 and more lines of this object)

But in the GUI there is no "Recently played".

@michaelherger
Copy link
Owner

Your issue seems to be the result of the issue I've mentioned before: the recently-played's content.items list is empty. I don't know why that would be so different from what we see in the native app.

@mr-manuel
Copy link
Author

mr-manuel commented Jul 2, 2023

Ok, then I try to contact the Spotify support asking why the list is empty in the web GUI. Maybe this way we reach something.

Link: https://community.spotify.com/t5/Spotify-for-Developers/Recently-played-list-empty/m-p/5603927#M9841

@michaelherger
Copy link
Owner

Thanks! I added the above screenshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants