It is currently April 19th, 2024, 11:57 am

Some problems regarding NowPlaying ("state" and "play")

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Some problems regarding NowPlaying ("state" and "play")

Post by jsmorley »

death.crafter wrote: June 20th, 2021, 3:05 pm And I am wondering why wouldn't they add the information I mentioned above in the docs. After all WebNowPlaying is an excellent plugin and combined with spicetify-cli it brings full support to Spotify, which probably is one of the most widely used music app.
WebNowPlaying is not part of the Rainmeter project. It is a 3rd-party plugin, and as with all external 3rd-party plugins, the author needs to maintain and document the plugin.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Some problems regarding NowPlaying ("state" and "play")

Post by death.crafter »

jsmorley wrote: June 20th, 2021, 3:09 pm WebNowPlaying is not part of the Rainmeter project. It is a 3rd-party plugin, and as with all external 3rd-party plugins, the author needs to maintain and document the plugin.
Fair enough.👍
from the Realm of Death
ingridd
Posts: 17
Joined: June 20th, 2021, 1:38 am

Re: Some problems regarding NowPlaying ("state" and "play")

Post by ingridd »

death.crafter wrote: June 20th, 2021, 4:22 am Spotify doesn't support state in NowPlaying. But WebNowPlaying and spicetify-cli does.

First you have to install spicetify.
Follow this guide: https://github.com/khanhas/spicetify-cli/wiki/Guide-for-Rainmeter-user

Then get the WebNowPlaying plugin (just install the example rmskin.)
Link: https://github.com/tjhrulz/WebNowPlaying/releases/tag/0.5.0

And then follow the skin and the readme : https://github.com/tjhrulz/WebNowPlaying.

If further problem arises fell free to reply.
hello, I just followed your instructions (installed spicetify and downloaded the plugin), but the state still doesn't update for me. when I play songs in spotify, the state remains "0" (I used some code to display the state onto one of my meters). In addition to that, the [MeterPlay] does not respond anymore. Is there anything in my code which is wrong? below is my code.
many thanks (and I hope it isn't a silly mistake :? ).

Code: Select all

[Rainmeter]
Update=16

[MeterBackground]
Group="np"
Meter=Shape
Shape=Rectangle 0,0,250,100 | Fill Color 255,255,255,0 | Stroke Color 255,255,255,0
SolidColor=0,0,0,1
MouseOverAction=[!SetOption "MeterNPLine" Shape "Rectangle ([MeterNPHead:X]+82), 10, 2, 90 | Fill Color 255,255,255,100 | Stroke Color 255,255,255,150"][!UpdateMeter "MeterNPLine"][!ShowMeter MeterPlay][!Redraw]
MouseLeaveAction=[!SetOption "MeterNPLine" Shape "Rectangle ([MeterNPHead:X]+82), 10, 2, 65 | Fill Color 255,255,255,100 | Stroke Color 255,255,255,150"][!UpdateMeter "MeterNPLine"][!HideMeter MeterPlay][!Redraw]

[MeasureNowPlaying]
Measure=Plugin
Plugin=WebNowPlaying
Player=Spotify
PlayerType=Title

[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying
Player=Spotify
PlayerType=Artist

[MeasureState]
Measure=Plugin
Plugin=WebNowPlaying
Player=Spotify
PlayerType=State
IfCondition=(MeasureState=1)
IfTrueAction=[!SetOption "MeterPlay" "ImageName" "#@#pause.png"][!UpdateMeter "MeterPlay"][!Redraw]
IfFalseAction=[!SetOption "MeterPlay" "ImageName" "#@#play.png"][!UpdateMeter "MeterPlay"][!Redraw]
;IfCondition2=(MeasureState=0)
;IfTrueAction2=[!HideMeterGroup "np"]
;IfFalseAction2=[!ShowMeterGroup "np"]

[MeterNPHead]
Group="np"
Meter=String
Text=Now#CRLF#Playing#CRLF#[MeasureState]
StringCase=lower
FontColor=255,255,255,150
FontFace=Montserrat Medium
AntiAlias=1
FontSize=13
DynamicVariables=1
SolidColor=0,0,0,1
Y=17

[MeterNPLine]
Group=np
Meter=Shape
DynamicVariables=1
Shape=Rectangle ([MeterNPHead:X]+82), 10, 2, 65 | Fill Color 255,255,255,100 | Stroke Color 255,255,255,150
SolidColor=0,0,0,1

[MeterNPName]
Group=np
Meter=String
MeasureName=MeasureNowPlaying
FontColor=255,255,255,150
ClipString=1
W=170
H=40
FontFace=Montserrat Medium
AntiAlias=1
FontSize=18
DynamicVariables=1
X=90
Y=10
SolidColor=0,0,0,1

[MeterNPArtist]
Group=np
Meter=String
Text=by [MeasureArtist]
ClipString=1
W=170
H=20
FontColor=255,255,255,150
FontFace=Montserrat Medium
AntiAlias=1
FontSize=10
DynamicVariables=1
X=95
Y=50
SolidColor=0,0,0,1

[MeterPlay]
Meter=Image
Hidden=1
SolidColor=0,0,0,1
DynamicVariables=1
ImageName=#@#play.png
ImageAlpha=100
PreserveAspectRatio=1
W=20
X=110
Y=80
MouseOverAction=[!SetOption "MeterPlay" ImageAlpha "200"]
MouseLeaveAction=[!SetOption "MeterPlay" ImageAlpha "100"]
LeftMouseUpAction=[!CommandMeasure "MeasureNowPlaying" "PlayPause"]
*EDIT: i tried pausing/playing using the example skin, but that doesnt work as well - did i make a mistake in the installing processes?
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Some problems regarding NowPlaying ("state" and "play")

Post by death.crafter »

ingridd wrote: June 21st, 2021, 12:28 am hello, I just followed your instructions (installed spicetify and downloaded the plugin), but the state still doesn't update for me. when I play songs in spotify, the state remains "0" (I used some code to display the state onto one of my meters). In addition to that, the [MeterPlay] does not respond anymore. Is there anything in my code which is wrong? below is my code.
many thanks (and I hope it isn't a silly mistake :? ).
Can I have the full skin? It's hard to tell this way.
from the Realm of Death
ingridd
Posts: 17
Joined: June 20th, 2021, 1:38 am

Re: Some problems regarding NowPlaying ("state" and "play")

Post by ingridd »

death.crafter wrote: June 21st, 2021, 4:38 am Can I have the full skin? It's hard to tell this way.
hello, I believe the code in my previous reply is the whole of the nowplaying.ini file I've been using.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Some problems regarding NowPlaying ("state" and "play")

Post by death.crafter »

ingridd wrote: June 21st, 2021, 6:56 am hello, I believe the code in my previous reply is the whole of the nowplaying.ini file I've been using.
No I mean the whole skin as a rmskin file. With the images and stuff. Anyway I will just rename some pngs. Next time post a rmskin file when asked for a skin.😄
from the Realm of Death
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Some problems regarding NowPlaying ("state" and "play")

Post by death.crafter »

This code works perfectly fine for me.

But there is no reason you should set Update=16 in Rainmeter section. It should be 1000.

If still not working for you, does the other measures like artist and title work fine? If they are working then state should work too. Just that it is a little late in receiving response from Spotify.
from the Realm of Death
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Some problems regarding NowPlaying ("state" and "play")

Post by Yincognito »

death.crafter wrote: June 20th, 2021, 10:14 amActually no. "play" and "playpause" do the same thing (tried myself).
balala wrote: June 20th, 2021, 2:51 pmBut take into account that, as has been said, Spotify is just a partly supported player, so might have such problems.
Balala is right on this one. It's simply the fact that Spotify is only partially supported that is causing the Play=PlayPause behavior. The docs can't cover every usage scenario when describing the behaviors in various players. Stating that X player is only partially supported should be enough for the user to realize not only that some things won't work at all, but also that other things might exhibit a different behavior than the standard one. It's a common misconception that this only means the former and not the latter.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Some problems regarding NowPlaying ("state" and "play")

Post by Yincognito »

jsmorley wrote: June 20th, 2021, 3:09 pm WebNowPlaying is not part of the Rainmeter project. It is a 3rd-party plugin, and as with all external 3rd-party plugins, the author needs to maintain and document the plugin.
Not debating this at all, I'm just curious: what makes a plugin part of the Rainmeter project (i.e. an "official" one)? Is it the authorship (e.g. only those made by the Rainmeter team, aka the devs), the documenting and support (e.g. if it's properly maintained), its quality (e.g. if it's better than others in the same area), or something else entirely? In other words, could a 3rd party plugin ever become part of the Rainmeter project (with the author either outside or part of the Rainmeter team), or it's just some impossible thing and the two worlds (both projects and people) are meant to be separated?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ingridd
Posts: 17
Joined: June 20th, 2021, 1:38 am

Re: Some problems regarding NowPlaying ("state" and "play")

Post by ingridd »

death.crafter wrote: June 21st, 2021, 9:13 am No I mean the whole skin as a rmskin file. With the images and stuff. Anyway I will just rename some pngs. Next time post a rmskin file when asked for a skin.😄
oh im so sorry, i wasnt aware

it doesnt show the artist or title or anything, which is why im thinking maybe i installed spicetify wrong or something

i set the [Update=16] because i thought it would prompt a faster response, but if thats causing problems i'll go ahead and make it 1000 for now