It is currently April 8th, 2020, 2:09 pm

Question about Spotify and skins

Help with creating, editing & fixing problems with skins
snail99
Posts: 3
Joined: March 23rd, 2020, 1:52 am

Question about Spotify and skins

Post by snail99 »

Hi, I've been tinkering with a skin called VisBubble (which is a visualizer) recently. My goal was to try and get the skin to load if I had music playing on Spotify and unload if I didn't have any music playing. After researching this problem for a while all I can figure is that Spotify doesn't play nice with rainmeter anymore and what you can do with it is quite limited. So all I really want to know is if anyone knows how to achieve something like this or if it's even possible. I'm new to rainmeter but if you point me in the right direction I'll do my best to figure it out.

My current code is this.

Code: Select all

[mProcessPID]
Measure=Plugin
Plugin=Plugins\Perfmon.dll
PerfMonObject="Process"
PerfMonCounter="ID Process"
PerfMonInstance=Spotify
PerfMonDifference=0
IfCondition=(mProcessPID>0)
IfTrueAction=[!ActivateConfig "VisBubble" "BarExtrude.ini"]
IfFalseAction=[!DeactivateConfig "VisBubble"]
UpdateDivider=1
I'll be completely honest I don't really know how it works since I just ended up copying it from another forum post. It allows me to load and unload VisBubble but it only takes into account if the Spotify program is open or not.
User avatar
balala
Rainmeter Sage
Posts: 10093
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Question about Spotify and skins

Post by balala »

snail99 wrote:
March 24th, 2020, 7:58 am
I'll be completely honest I don't really know how it works since I just ended up copying it from another forum post. It allows me to load and unload VisBubble but it only takes into account if the Spotify program is open or not.
So you didn't even try out the above [mProcessPID] measure, to see if it is working?
snail99
Posts: 3
Joined: March 23rd, 2020, 1:52 am

Re: Question about Spotify and skins

Post by snail99 »

The [mProcessPID] measures only half works. Currently, if I have the Spotify program running then VisBubble will be loaded and if I close the program VisBubble will unload. My issue is that I'm trying to get it to do that but in relation to if the music is playing or not. So if the music is playing then have VisBubble loaded and then if I pause the music or close Spotify then to have it unload.
User avatar
balala
Rainmeter Sage
Posts: 10093
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Question about Spotify and skins

Post by balala »

snail99 wrote:
March 24th, 2020, 4:12 pm
My issue is that I'm trying to get it to do that but in relation to if the music is playing or not. So if the music is playing then have VisBubble loaded and then if I pause the music or close Spotify then to have it unload.
Well, unfortunately I can't help here, because I'm not using Spotify at all. As far as I can tell, there has been released a plugin which worked with Spotify, but later that one has been canceled as well, if I'm not mistaken.
Probably here will be needed someone who is using Spotify, to tell you precisely if there is a well working plugin and if it does, which one is.
Sorry...
snail99
Posts: 3
Joined: March 23rd, 2020, 1:52 am

Re: Question about Spotify and skins

Post by snail99 »

Thanks for looking into it at least. I'll keep looking for an answer.
User avatar
Yincognito
Posts: 1152
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Question about Spotify and skins

Post by Yincognito »

snail99 wrote:
March 24th, 2020, 7:58 am
Hi, I've been tinkering with a skin called VisBubble (which is a visualizer) recently. My goal was to try and get the skin to load if I had music playing on Spotify and unload if I didn't have any music playing. After researching this problem for a while all I can figure is that Spotify doesn't play nice with rainmeter anymore and what you can do with it is quite limited. So all I really want to know is if anyone knows how to achieve something like this or if it's even possible. I'm new to rainmeter but if you point me in the right direction I'll do my best to figure it out.

My current code is this.

Code: Select all

[mProcessPID]
Measure=Plugin
Plugin=Plugins\Perfmon.dll
PerfMonObject="Process"
PerfMonCounter="ID Process"
PerfMonInstance=Spotify
PerfMonDifference=0
IfCondition=(mProcessPID>0)
IfTrueAction=[!ActivateConfig "VisBubble" "BarExtrude.ini"]
IfFalseAction=[!DeactivateConfig "VisBubble"]
UpdateDivider=1
I'll be completely honest I don't really know how it works since I just ended up copying it from another forum post. It allows me to load and unload VisBubble but it only takes into account if the Spotify program is open or not.
See if one of the choices below can help in doing what you want:
- NowPlaying measure (it seems to only partially support Spotify - i.e. the Artist and Track values for the PlayerType option - but although you won't be able to check if something is playing, maybe you can load your skin if the Artist option is anything else than the empty string, aka playing or paused on some song, for example)
- WebNowPlaying plugin (this one seems to fully support Spotify, probably just in a browser window, but, just as in balala's case, I have no way of testing if it works, since I don't use it)

Some little bonus to read here, here and here as well.

Well, you asked to at least be pointed out in the right direction. This is as "right" as it can get for the moment.
User avatar
balala
Rainmeter Sage
Posts: 10093
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Question about Spotify and skins

Post by balala »

Yincognito wrote:
March 26th, 2020, 11:25 am
See if one of the choices below can help in doing what you want:
- NowPlaying measure (it seems to only partially support Spotify - i.e. the Artist and Track values for the PlayerType option - but although you won't be able to check if something is playing, maybe you can load your skin if the Artist option is anything else than the empty string, aka playing or paused on some song, for example)
The NowPlaying measure for sure can't help, because snail99 needed a way to know when Spotify is playing and when is ti stopped or paused. Although NowPlaying can do this for some players (like WMP or Winamp), it can't for Spotify, which is just partially supported, this feature not being supported.
User avatar
Yincognito
Posts: 1152
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Question about Spotify and skins

Post by Yincognito »

balala wrote:
March 26th, 2020, 11:30 am
because snail99 needed a way to know when Spotify is playing and when it is stopped or paused.
Yes, indeed - you're right. I just thought it may be possible to workaround those limitations by doing some trick with the Artist/Track options and the bangs that were available, in order to "simulate" getting that playing status, but I guess I was wrong.
User avatar
balala
Rainmeter Sage
Posts: 10093
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Question about Spotify and skins

Post by balala »

Yincognito wrote:
March 26th, 2020, 1:14 pm
Yes, indeed - you're right. I just thought it may be possible to workaround those limitations by doing some trick with the Artist/Track options and the bangs that were available, in order to "simulate" getting that playing status, but I guess I was wrong.
What he would need is the PlayerType=State option, but unfortunately this isn't supported for Spotify, at least based on the documentation.
User avatar
Yincognito
Posts: 1152
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Question about Spotify and skins

Post by Yincognito »

balala wrote:
March 26th, 2020, 1:38 pm
What he would need is the PlayerType=State option, but unfortunately this isn't supported for Spotify, at least based on the documentation.
I knew that, but sometimes one thing can be indirectly achieved, without needing a direct option for it. Not this case though, I agree.