It is currently April 20th, 2024, 4:13 pm

Cleartext and Spotify problem

Get help with creating, editing & fixing problems with skins
vap96
Posts: 3
Joined: February 5th, 2021, 4:02 pm

Cleartext and Spotify problem

Post by vap96 »

Hello I am new to reainmeter community, I installed the cleartext skin and i changed it a bit just as far as its design only , i added play/pause , and next previous button. It works perfeclty with windows media player, musicbee. Absolutely fine.. My problem is Spotify. Although it does recognize the song info it does not change the image of play to pause when i hit the button . the function of play/pause still works . Any ideas of how to fix it ? i post the cleartext.ini file

Code: Select all

[Rainmeter]
Update=1000
MouseOverAction=[!ShowMeterGroup Hover][!ShowMeterGroup #stowAwayName#][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!HideMeterGroup Hover][!HideMeterGroup #stowAwayName#][!UpdateMeter *][!Redraw]
AccurateText=1
DynamicWindowSize=1
SkinHeight=(#skinSize#*0.2)

ContextTitle=Open Settings panel
ContextAction=!ActivateConfig "Cleartext\Settings"
ContextTitle2=Use Cleartext Pure
ContextAction2=!ActivateConfig "Cleartext"

[Metadata]
Name=Cleartext
Author=Redsaph
Description=Displays track information from various media players.
Version=5.1.1
License=Creative Commons BY-NC-SA 3.0

[Variables]
@include=#@#base.ini
currentlySetAlign=right


; STYLES ==========================================
[styleTextControls]
FontFace=#controlsFont#
FontSize=(#skinSize#*0.02)
AntiAlias=1
FontColor=#translucent#
StringAlign=#interfaceTextAlignment#
DynamicVariables=1
Hidden=1
Group=Hover | Visible
MouseActionCursor=1

[styleTextMini]
FontFace=#controlsFont#
FontSize=(#skinSize#*0.0175)
AntiAlias=1
FontColor=#opaque#
StringAlign=#interfaceTextAlignment#
DynamicVariables=1
Hidden=1
Group=Hover | Visible

[styleTextMajor]
H=100
FontSize=16
FontColor=#opaque#
AntiAlias=1
Group=Visible

; =================================================
; Meters

[MeasureState]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasureArtist]
PlayerType=STATE
Substitute="0":"play.png","1":"pause.png","2":"play.png"

[LuaSettings]
Measure=Script
ScriptFile=#@#settings.lua


[mTopTextWidth]
Measure=Calc
Formula=[TopText:W]
OnChangeAction=[!WriteKeyValue Variables topTextWidth "[mTopTextWidth]" "#@#variables.inc"]
DynamicVariables=1
Group=AlignmentMeasure

[mBottomTextWidth]
Measure=Calc
Formula=[BottomText:W]
OnChangeAction=[!WriteKeyValue Variables bottomTextWidth "[mBottomTextWidth]" "#@#variables.inc"][!CommandMeasure "LuaAlign" "alignRightOnUpdate()"]
DynamicVariables=1
Group=AlignmentMeasure

[LuaAlign]
Measure=Script
ScriptFile=#@#align.lua
UpdateDivider=8
DynamicVariables=1

[Background]
Meter=Image
X=0
Y=0
W=((#skinSize# > #lastSetWidth#) ? (#skinSize#+(#skinSize#*0.35)) : (#lastSetWidth#+(#skinSize#*0.1)))
H=(#skinSize#)
SolidColor=0,0,0,1
DynamicVariables=1
Group=Visible

[Now]
Meter=String
Text=Now
StringCase=Upper
StringAlign=#interfaceTextAlignment#
FontSize=(#skinSize#*0.03)
FontColor=#opaque#
X=#nowTextPositionHor#
Y=(#skinSize#*0.09)
AntiAlias=1
FontFace=#controlsFont#
UpdateDivider=-1
Hidden=#stowAway#
Group=Stow | Visible

[Playing]
Meter=String
Text=Playing
StringCase=Upper
StringAlign=#interfaceTextAlignment#
FontSize=(#skinSize#*0.03)
FontColor=#opaque#
X=r
Y=(#skinSize#*0.125)
AntiAlias=1
FontFace=#controlsFont#
UpdateDivider=-1
Hidden=#stowAway#
Group=Stow | Visible

[Hairline]
Meter=Bar
MeasureName=mProgress#MusicSwitch#P
X=#hairlinePositionHor#
W=(#skinSize#*0.005)
H=(#skinSize#*0.25)
BarColor=#over#
SolidColor=#opaque#
BarOrientation=Vertical
ToolTipText="Progress Bar"
UpdateDivider=4
Hidden=#stowAway#
Group=Stow | Visible

[ArtistText]
Meter=String
MeterStyle=styleTextMajor
MeasureName=#topText##MusicSwitch#
X=110
Y=55
FontFace=#thinFont#
Text="%1" 
StringAlign=#mediaTextAlignment#

[SongText]
Meter=String 
MeterStyle=styleTextMajor
MeasureName=#bottomText##MusicSwitch#
X=110
Y=27
FontFace=#thickFont#
Text="%1" 
StringAlign=#mediaTextAlignment#

[Time]
Meter=STRING
MeterStyle=styleTextMini
MeasureName=mPosition#MusicSwitch#
MeasureName2=mLength#MusicSwitch#
X=#nowTextPositionHor#
Y=(#skinSize#*0.02)
Text="%1/%2"
UpdateDivider=4

[Progress]
Meter=String
MeterStyle=styleTextMini
MeasureName=mProgress#MusicSwitch#W
X=r
Y=(#skinSize#*0.0465)
Text="%1%"



[PlayPause]
MeterStyle=styleTextControls
Meter=IMAGE
MeasureName=mStateButton#MusicSwitch#
ImageName=C:\Users\vapti\Documents\Rainmeter\Skins\Cleartext\@Resources\Images\%1
X=160
Y=60
W=25
H=25
LeftMouseUpAction=!CommandMeasure "m#playerController#" "PlayPause"
UpdateDivider=4
SolidColor=0,0,0,1

[Previous]
Meter=IMAGE
MeterStyle=styleTextMini
ImageName=C:\Users\vapti\Documents\Rainmeter\Skins\Cleartext\@Resources\Images\previous.png
X=110
Y=60
W=25
H=25
LeftMouseUpAction=!CommandMeasure "m#playerController#" "Previous"
UpdateDivider=-1

[Next]
Meter=IMAGE
MeterStyle=styleTextMini
ImageName=C:\Users\vapti\Documents\Rainmeter\Skins\Cleartext\@Resources\Images\next.png
X=210
Y=60
w=25
H=25
LeftMouseUpAction=!CommandMeasure "m#playerController#" "Next"
UpdateDivider=-1
SolidColor=0,0,0,1

[Settings]
Meter=String
MeterStyle=styleTextMini
FontColor=#translucent#
X=#settingsTextPositionHor#
Y=(#skinSize#*0.0465)
Text="settings"
MouseActionCursor=1
LeftMouseUpAction=!ActivateConfig "Cleartext\Settings"
UpdateDivider=-1
vap96
Posts: 3
Joined: February 5th, 2021, 4:02 pm

Re: Cleartext and Spotify problem

Post by vap96 »

[img]file:///D:/Desktop/Screenshot_2.jpg[/img]
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Cleartext and Spotify problem

Post by CyberTheWorm »

Code: Select all

LeftMouseUpAction=[!CommandMeasure "MeasurePlayer" "PlayPause"][!Refresh][!Refresh]
I had to add 2x refresh to get it to change, spotify is a pain.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
vap96
Posts: 3
Joined: February 5th, 2021, 4:02 pm

Re: Cleartext and Spotify problem

Post by vap96 »

CyberTheWorm wrote: February 5th, 2021, 4:30 pm

Code: Select all

LeftMouseUpAction=[!CommandMeasure "MeasurePlayer" "PlayPause"][!Refresh][!Refresh]
I had to add 2x refresh to get it to change, spotify is a pain.
you are right, however the name of song dissapears when paused..
User avatar
balala
Rainmeter Sage
Posts: 16150
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Cleartext and Spotify problem

Post by balala »

vap96 wrote: February 5th, 2021, 4:15 pm I installed the cleartext skin and i changed it a bit just as far as its design only , i added play/pause , and next previous button. It works perfeclty with windows media player, musicbee. Absolutely fine.. My problem is Spotify. Although it does recognize the song info it does not change the image of play to pause when i hit the button . the function of play/pause still works . Any ideas of how to fix it ?
Spotify is just a partially supported player (see the Partially supported players section here) so the NowPlaying measures can return only the artist and the title. This means that for instance the PlayerType=STATE option (used onto the [MeasureState] measure) doesn't work, the measure returns probably always 0 and as such, the skins shows always the play button. That's why, as you said, the skin works with Windows Media Player or MusicBee, these being fully supported players.
A while ago there has been posted a Spotify plugin, which had all these features. If I'm not wrong, in meantime it has been deprecated, but later another plugin has been released. Since I refuse to use Spotify, I'm not sure about all these plugins, but probably someone else who are using them will come to advice you.

Additional note: although a while ago NowPlaying has been a plugin, in meantime it has been converted to an internale measure. So you should have to replace the Measure=Plugin and Plugin=NowPlaying.dll option pairs with the much more simple Measure=NowPlaying option.
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Cleartext and Spotify problem

Post by CyberTheWorm »

vap96 wrote: February 5th, 2021, 4:46 pm you are right, however the name of song dissapears when paused..
Not always it's totally random
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Cleartext and Spotify problem

Post by CodeCode »

CyberTheWorm wrote: February 6th, 2021, 12:14 am Not always it's totally random
Perhaps try adding a !RefreshGroup and naming your Title Measure/Meters with a Group= value in the same line as your play/pause commands and refreshes?
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16150
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Cleartext and Spotify problem

Post by balala »

vap96 wrote: February 5th, 2021, 4:17 pm [img]file:///D:/Desktop/Screenshot_2.jpg[/img]
You can't attach an image from your computer with <img>...</img> tag. You have to upload it to an imagehost site (http://www.imagebam.com/ for isntance) and post the link of the image.