It is currently May 1st, 2024, 11:55 am

nowplaying bug?

Get help with creating, editing & fixing problems with skins
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

nowplaying bug?

Post by UnforgivenRevival »

The Rainmeter manual states that for the "state" in the nowplaying plugin there are 3 options, 0, 1, and 2, But it seems now that when the player is closed, OR no music is playing, "0" is no longer a valid option. This has worked in older versions of Rainmeter with no player open, closed, with or without music playing, And now, currently it wont show a image when the player is closed or stopped for "0". It only shows when there is music playing. Here is my code:

Code: Select all

;------------------------------------------------------------Player----------

[PlayerPopup]
Meter=Image
ImageName=#@#Popups\Popup1#PopupColor#.png
x=(#SCREENAREAWIDTH#/2+145)
y=20
Hidden=1
Group=Player

[PlayerLabel]
Meter=String
FontColor=#FontColorH#
FontFace=#FontFace#
AntiAlias=1
FontSize=#FontSize2#
StringAlign=Center
Hidden=1
Text="Music Player"
X=(#SCREENAREAWIDTH#/2+246)
y=220
Group=Player

[MeasureDeactivate2]
Measure=Calc
Formula=MeasureDeactivate2+1
IfEqualValue=2
IfEqualAction=[!HideMeterGroup Player][!Zpos -2][!DisableMeasure MeasureDeactivate2]
Disabled=1
DynamicVariables=1

[MeasurePlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=TITLE
DisableLeadingZero=1
Substitute="":"N\A"
TrackChangeAction=[!ShowMeterGroup Player][!Zpos 2][!EnableMeasure MeasureDeactivate2]

[MeasureArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=ARTIST
Substitute="":"N\A"

[MeasureAlbum]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=ALBUM
Substitute="":"N\A"

[MeasureCover]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=COVER
Substitute="":"#@#Music\Default.png"

[MeasurePosition]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=POSITION

[MeasureDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=DURATION

[MeasureProgress]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=PROGRESS

[MeasureRating]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=RATING

[MeasureStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=STATE
Substitute="0":"#@#Icons\Play2#IconColor#.png","1":"#@#Icons\Pause#IconColor#.png","2":"#@#Icons\Play#IconColor#.png"

[MeasureRepeat]
Measure=Plugin
Plugin=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=REPEAT

[MeasureShuffle]
Measure=Plugin
Plugin=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=SHUFFLE

[Cover]
Meter=Image
MeasureName=MeasureCover
X=(#SCREENAREAWIDTH#/2+168)
Y=60
AntiAlias=1
W=80
H=80
SolidColor=200,200,200,50
LeftMouseUpAction=[!CommandMeasure MeasurePlayer OpenPlayer]
Hidden=1
Group=Player

[Stars]
Meter=Bitmap
X=(#SCREENAREAWIDTH#/2+255)
Y=65
MeasureName=MeasureRating
BitmapImage=#@#Music\Rating#IconColor#.png
BitmapFrames=6
BitmapZeroFrame=1
Hidden=1
Group=Player

[SetRating1]
Meter=Image
X=r
Y=r
W=13
H=10
SolidColor=00000001
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#Openclick.wav][!CommandMeasure MeasurePlayer "SetRating 1"]
Hidden=1
Group=Player

[SetRating2]
Meter=Image
X=13r
Y=r
W=13
H=10
SolidColor=00000001
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#Openclick.wav][!CommandMeasure MeasurePlayer "SetRating 2"]
Hidden=1
Group=Player

[SetRating3]
Meter=Image
X=13r
Y=r
W=13
H=10
SolidColor=00000001
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#Openclick.wav][!CommandMeasure MeasurePlayer "SetRating 3"]
Hidden=1
Group=Player

[SetRating4]
Meter=Image
X=13r
Y=r
W=13
H=10
SolidColor=00000001
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#Openclick.wav][!CommandMeasure MeasurePlayer "SetRating 4"]
Hidden=1
Group=Player

[SetRating5]
Meter=Image
X=13r
Y=r
W=13
H=10
SolidColor=00000001
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#Openclick.wav][!CommandMeasure MeasurePlayer "SetRating 5"]
Hidden=1
Group=Player

[Title]
Meter=String
MeasureName=MeasurePlayer
X=(#SCREENAREAWIDTH#/2+170)
Y=165
W=160
H=15
FontFace=#Fontface#
FontColor=#FontColor#
FontSize=(#FontSize#+2)
AntiAlias=1
ClipString=1
Text="%1"
Hidden=1
Group=Player

[Artist]
Meter=String
MeasureName=MeasureArtist
X=(#SCREENAREAWIDTH#/2+170)
Y=16r
W=160
H=15
FontSize=(#FontSize#+2)
FontFace=#Fontface#
FontColor=#FontColor#
AntiAlias=1
ClipString=1
Text="%1"
Hidden=1
Group=Player

[Album]
Meter=String
MeasureName=MeasureAlbum
X=(#SCREENAREAWIDTH#/2+170)
Y=16r
FontSize=(#FontSize#+2)
W=160
H=15
FontFace=#Fontface#
FontColor=#FontColor#
AntiAlias=1
ClipString=1
Text="%1"
Hidden=1
Group=Player

[TimeA]
Meter=String
MeasureName=MeasurePosition
MeasureName2=MeasureDuration
X=(#SCREENAREAWIDTH#/2+250)
Y=132
W=80
H=20
FontFace=#Fontface#
FontSize=(#FontSize#+1)
FontColor=#FontColor#
AntiAlias=1
ClipString=1
Text="%1/%2"
Hidden=1
Group=Player

[ProgressBar]
Meter=BAR
MeasureName=MeasureProgress
X=(#SCREENAREAWIDTH#/2+165)
Y=150
W=163
H=5
BarColor=#FontColor#
SolidColor=FFFFFF10
BarOrientation=HORIZONTAL
Hidden=1
Group=Player

[Previous]
Meter=Image
ImageName=#@#Icons\Back#IconColor#.png
X=(#SCREENAREAWIDTH#/2+255)
Y=95
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#openclick.wav][!CommandMeasure MeasurePlayer Previous][!Redraw]
W=18
Hidden=1
Group=Player

[PlayPause]
Meter=Image
ImageName=[MeasureStateButton]
X=18r
Y=r
W=18
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#openclick.wav][!CommandMeasure MeasurePlayer PlayPause][!Redraw]
DynamicVariables=1
Hidden=1
Group=Player

[Next]
Meter=Image
ImageName=#@#Icons\Forward#IconColor#.png
X=18r
Y=r
W=18
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#openclick.wav][!CommandMeasure MeasurePlayer Next][!Redraw]
Hidden=1
Group=Player

[Stop]
Meter=Image
ImageName=#@#Icons\Stop#IconColor#.png
X=18r
Y=r
W=18
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#openclick.wav][!CommandMeasure MeasurePlayer Stop][!Redraw]
Hidden=1
Group=Player

[Repeat]
Meter=Image
ImageName=#@#Icons\Repeat#IconColor#.png
X=-40r
Y=20r
W=15
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#openclick.wav][!CommandMeasure MeasurePlayer "SetRepeat -1"][!Redraw]
Hidden=1
Group=Player

[Shuffle]
Meter=Image
ImageName=#@#Icons\Shuffle#IconColor#.png
X=29r
Y=r
W=15
LeftMouseDownAction=[!SetVariable Reset 0]
LeftMouseUpAction=[PLAY #@#openclick.wav][!CommandMeasure MeasurePlayer "SetShuffle -1"][!Redraw]
Hidden=1
Group=Player

It seems something has changed in the last 1 or 2 recent betas, and I cannot figure out why it is doing this. I also have tried it with iTunes and WMP, and even different filenames, With the same results. The play/pause works when a player is open and playing, So I know something is right. As soon as you stop the music or close the player, The button goes away again.

Right now I have a gap between the other buttons which is really annoying. :thumbdown:

Is anyone else having this problem?

Using:
Win 7 x64
Rainmeter 2.4.0 Beta r1598 64-bit.
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Re: nowplaying bug?

Post by UnforgivenRevival »

Hmm, Just tried a different skin, and it is working with almost the same code as mine. There must be an error in my code somewhere, But I cant spot it. can anyone else?


*Feel free to move this to the skins help, if needed*
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: nowplaying bug?

Post by Kaelri »

The problem is here:

Code: Select all

Substitute="0":"#@#Icons\Play2#IconColor#.png","1":"#@#Icons\Pause#IconColor#.png","2":"#@#Icons\Play#IconColor#.png"
All substitutions on a value are done in order. When the State is zero, the first substitute replaces the 0 with #@#Icons\Play2#IconColor#.png. But then the third substite replaces the 2 in there with #@#Icons\Play2#IconColor#.png. So the result is:

#@#Icons\Play#@#Icons\Play#IconColor#.png#IconColor#.png

To fix it, all you have to do is rename the image to something that doesn't contain any substituted characters.
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Re: nowplaying bug?

Post by UnforgivenRevival »

But the thing is, Even if I use this line and get rid of the number, It still doesnt work. This is how I originally had it(just tried this again to double check), I added the 2 to try a different file name just to see if that would work when this didnt work:

Code: Select all

Substitute="0":"#@#Icons\Play#IconColor#.png","1":"#@#Icons\Pause#IconColor#.png","2":"#@#Icons\Play#IconColor#.png"
Eliminating the numbers, It still doesnt show for "0". the #iconcolor# is either B or W so it cant be messing with it either, I dont think.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: nowplaying bug?

Post by Kaelri »

Can you upload the complete skin (including images) somewhere? It seems like that should work by itself, so I'm guessing something else in the skin is messing it up.
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Re: nowplaying bug?

Post by UnforgivenRevival »

Expect a PM in a few, Dont want to publicly release this just yet. Still have a few tweaks to work out on it besides this.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: nowplaying bug?

Post by Kaelri »

Ah, yep, I see it. #IconColor# doesn't contain any numbers, but #@# does.

Code: Select all

Substitute="0":"#@#Icons\Play#IconColor#.png"
=

Code: Select all

Substitute="0":"C:\Users\YourName\Documents\Rainmeter\Skins\BlackBarV1.5\@Resources\Icons\PlayB.png"
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Re: nowplaying bug?

Post by UnforgivenRevival »

Question, If that is the problem, Why do the other "#@#"s not effect the images for "1" and "2"?

Edit: Hmm... it still isnt working for me. a direct path to the file, also eliminating #iconcolor# from the substitute, and no luck. I have no idea what I am doing wrong. :|
Last edited by UnforgivenRevival on August 20th, 2012, 1:18 am, edited 1 time in total.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: nowplaying bug?

Post by Kaelri »

If the substitutes don't match anything in the string, then they aren't used. When the player state is 1, it ignores "0":"...". And when the player state is 2, it ignores both "0":"..." and "1":"...".

So the only remaining risk is when the state is 1, and there is a "2" in the string after the "1":"..." substitution. Currently, there is not; it's the "BlackBarV1.5" that's the issue. But it would become a problem when you hit "BlackBarV2.0". ;)
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Re: nowplaying bug?

Post by UnforgivenRevival »

So if I remove the numbers from the folder names, it should work?