rainmeter / rainmeter

Desktop customization tool for Windows
https://rainmeter.net
GNU General Public License v2.0
4.78k stars 574 forks source link

New Spotify class name #151

Closed khanhas closed 6 years ago

khanhas commented 6 years ago

Since version 1.0.75.483.g7ff4a0dc, Spotify changed its client class name to Chrome_WidgetWin_0 and NowPlaying plugin control commands are no longer working.

Quick fix in this line should do: https://github.com/rainmeter/rainmeter/blob/06840fc7a6d049b3e59420c49ae034ebe957afee/Library/NowPlaying/PlayerSpotify.cpp#L59

aabusheikh commented 6 years ago

Is this what causes plugins/measures not detecting Spotify correctly? I'm not too familiar with Rainmeter source code, came here to find a solution to plugins not detecting that spotify is open (NowPlaying doesn't see it).

Also does Spotify Win10 version (from the App store) have the same client name? My issue may be caused by the fact that I use the UWP version and not the classic Win32 one.

I am not sure if this is useful in any way, but I will also add that the latest version of SpotifyPlugin grabs all the information from spotify UWP correctly (Song, Artist, Time, Cover Art, etc...). So the issue is only with NowPlaying.

forteddyt commented 6 years ago

I'm coming from MarcoPixel/Monstercat-Visualizer#144 looking for a fix to that. Changing the line from

m_Window = FindWindow(L"SpotifyMainWindow", nullptr); 

to

m_Window = FindWindow(L"Chrome_WidgetWin_0", nullptr);

restored (most) functionality of that skin. Obtaining Song image, name, etc. broke, but I think that's separate from this issue.

What's the best way of going about sharing this change?

aabusheikh commented 6 years ago

SpotifyPlugin still works for grabbing song info. Since I believe it uses the spotify web API. Rainmeter controls however use NowPlaying which was broken by the Spotify update.

Just thought I should mention that SpotifyPlugin works in case you're developing a plugin/skin of your own.

(Might be working for premium members only).

brianferguson commented 6 years ago

We are aware of the issue and are currently waiting for Spotify to remedy on their end. Their change affected lots of software. (We will leave this issue open until they fix it. If they do not, we will make the change.)

Side note: NowPlaying is getting pretty outdated with most players changing their API's and communication methods over time. Most platforms seem to make hasty decisions resulting in loss of functionality for 3rd party apps. While not ideal, we have chosen to promote the use of 3rd party plugins that are frequently updated to use in skins instead of the NowPlaying plugin. (Of course, if some eager developer would like to take a shot at updating the derelict players, we would gladly review any pull requests!)

-Brian

Godlikehobbit commented 6 years ago

According to Spotify the change was intentional and won't be fixed by them, although it's possible (probable) that the support staff are wrong.

The Spotify community post about the issue

tjhrulz commented 6 years ago

Oh wow did not know that Khanhas had opened an issue on here.

Yeah I imagine that we ended up on a desk of someone who was not a programmer (If we had this would have been a 10 second fix and a programmer laughing at someone else's ineptitude who forgot to set the class name when they merged in a new update of their rendering engine)

However since we have now hit a dead end I plan on working around this in NowPlaying and will also likely partner up with .raptor (The maker of the spotify plugin) to get his commands working for non premium users so everyone can just switch to using that.