Page 1 of 1

MusicBee state not updating

Posted: May 25th, 2020, 10:05 am
by Azthenix
Edit: Nevermind, I'm just stupid

I am having trouble with musicbee state that should change when I play or pause the track, but it's stuck on state "0".

The image of a play button should change into a pause button when I click on it and vice versa.

Here is a small snippet of my project

Code: Select all

[Rainmeter]
Update=1000
Background="Player/bg.png"
BackgroundMode=3
BackgroundMargins=14,30,14,14

[MeasurePlayer]
Measure=NowPlaying
PlayerName=CAD
PlayerType=TITLE

[MeasureState]
Measure=Plugin
Plugin=NowPlaying
PlayerName=#PlayerName#
PlayerType=STATE
Substitute="0":"Play","1":"Pause","2":"Play"

[MeterPlay]
Meter=Image
MeasureName=MeasureState
ImageName="Player/%1.png"
X=60r
Y=-12r
LeftMouseUpAction=[!CommandMeasure "MeasurePlayer" "PlayPause"]

Re: MusicBee state not updating

Posted: May 25th, 2020, 12:56 pm
by Azthenix
Thank you for the reference but I already found the problem after accidentally stumbling into the logs. On the [MeasureState], I forgot to change the #PlayerName# to MeasurePlayer.

Re: MusicBee state not updating

Posted: May 25th, 2020, 6:25 pm
by balala
Azthenix wrote: May 25th, 2020, 12:56 pm On the [MeasureState], I forgot to change the #PlayerName# to MeasurePlayer.
No, to be precise, not to MeasurePlayer, but to [MeasurePlayer]. so the correct form of the option is not PlayerName=MeasurePlayer, but PlayerName=[MeasurePlayer].
Important difference.

Re: MusicBee state not updating

Posted: May 26th, 2020, 2:19 am
by Azthenix
balala wrote: May 25th, 2020, 6:25 pm No, to be precise, not to MeasurePlayer, but to [MeasurePlayer]. so the correct form of the option is not PlayerName=MeasurePlayer, but PlayerName=[MeasurePlayer].
Important difference.
Oh right, sorry for the typo.

Re: MusicBee state not updating

Posted: May 26th, 2020, 10:11 am
by balala
Azthenix wrote: May 26th, 2020, 2:19 am Oh right, sorry for the typo.
Alright if this is a typo, but if on your code you're losing the brackets, the measure doesn't work, so take care.