Hi all,
I managed to make the mond player compatible with the Spotify Desktop Player with Spicetify and version 1.2.0 of WebNowPlaying. Everything is running with no problems but I also would like to further customize and add the album cover next to the song title. I'm really new to rainmeter and I was wondering if this was possible to do, thanks!
It is currently September 21st, 2024, 3:26 am
Mond skin - Adding Spotify album cover to player
-
- Posts: 4
- Joined: April 18th, 2024, 10:47 pm
-
- Rainmeter Sage
- Posts: 16568
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Mond skin - Adding Spotify album cover to player
Most probably it is, but to can help you you should help us for first, for instance by a code of your skin. I understand you're using the Mond package, but I assume the original code has been altered in some way, so we have no idea how is it looking like. So post it, please.kiyeon wrote: ↑April 18th, 2024, 10:53 pm I managed to make the mond player compatible with the Spotify Desktop Player with Spicetify and version 1.2.0 of WebNowPlaying. Everything is running with no problems but I also would like to further customize and add the album cover next to the song title. I'm really new to rainmeter and I was wondering if this was possible to do, thanks!
-
- Posts: 4
- Joined: April 18th, 2024, 10:47 pm
Re: Mond skin - Adding Spotify album cover to player
Yeah for sure, heres the code I have in "PlayerSpotify' in the player folderbalala wrote: ↑April 19th, 2024, 6:41 pm Most probably it is, but to can help you you should help us for first, for instance by a code of your skin. I understand you're using the Mond package, but I assume the original code has been altered in some way, so we have no idea how is it looking like. So post it, please.
Code: Select all
[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]
[Variables]
@include=#@#Variables.inc
Scale=2.1
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ARTIST
Substitue="":""
[MeasureTitle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=TITLE
Substitue="":""
[MeasureAlbum]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ALBUM
Substitue="":""
[MeasureProgress]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=PROGRESS
[MeasureDuration]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=DURATION
[MeasurePosition]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=POSITION
[MeasureStateButton]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png"
[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasureDuration - MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasureDuration - MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeterArtist]
Meter=String
MeasureName=MeasureArtist
StringAlign=Center
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(95*#Scale#)
Y=(15*#Scale#)
Text="%1"
AntiAlias=1
[MeterTitle]
Meter=String
MeasureName=MeasureTitle
StringAlign=Center
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(95*#Scale#)
Y=(8*#Scale#)r
Text="%1"
AntiAlias=1
[MeterPosition]
Meter=String
MeasureName=MeasurePosition
StringAlign=Center
FontFace=Quicksand
FontColor=#TextColor#
FontSize=(4*#Scale#)
X=(10*#Scale#)
Y=(2.5*#Scale#)
AntiAlias=1
[MeterDuration]
Meter=String
MeasureName=MeasureDuration
StringAlign=Center
FontFace=Quicksand
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(185*#Scale#)
Y=(2.5*#Scale#)
AntiAlias=1
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeterBar]
Meter=Shape
X=(23*#Scale#)
Y=(5*#Scale#)
Shape=Rectangle 0,0,(150*#Scale#),(1*#Scale#),0 | Fill Color #TextColor#,30 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*1.5*#Scale#),(1*#Scale#),0 | Fill Color #TextColor# | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(1.2*#Scale#) |Fill Color #TextColor# | StrokeWidth 0
Shape4=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(3.4*#Scale#) |Fill Color #TextColor#,50 | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeterPrevious]
Meter=Image
ImageName=#@#Previous.png
X=(69*#Scale#)
Y=(35*#Scale#)
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Previous"]
[MeterPlayPause]
Meter=Image
ImageName=[MeasureStateButton]
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
SolidColor=0,0,0,1
ImageTint=#Color2#
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureStateButton" "PlayPause"]
[MeterNext]
Meter=Image
ImageName=#@#Next.png
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Next"]
-
- Rainmeter Sage
- Posts: 8195
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Mond skin - Adding Spotify album cover to player
It should be possible. Use PlayerType=Cover in a new WebNowPlaying measure, depending on your needs, to get the path to the cover image:kiyeon wrote: ↑April 18th, 2024, 10:53 pm Hi all,
I managed to make the mond player compatible with the Spotify Desktop Player with Spicetify and version 1.2.0 of WebNowPlaying. Everything is running with no problems but I also would like to further customize and add the album cover next to the song title. I'm really new to rainmeter and I was wondering if this was possible to do, thanks!
https://wnp.keifufu.dev/rainmeter/usage
then use an Image meter with its MeasureName set to the newly created WebNowPlaying measure, to display the image located at that path:
https://docs.rainmeter.net/manual/meters/image/
The approach for cover art web addresses (instead of local paths) might be slightly different in terms of the PlayerType value and could involve using a Download=1 in a suited WebParser measure:
https://docs.rainmeter.net/manual/measures/webparser/#Download
Not entirely sure, but the sample skin from the WebNowPlaying release might already have a minimal example of displaying the cover art:
https://forum.rainmeter.net/viewtopic.php?t=26619
-
- Rainmeter Sage
- Posts: 16568
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Mond skin - Adding Spotify album cover to player
To be little bit more specific than Yincognito, add the following measure to your code:
Code: Select all
[MeasureCover]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=COVER
Add an Image meter, to can get visible the cover. For instance this one:
Code: Select all
[MeterCover]
Meter=Image
MeasureName=MeasureCover
SolidColor=0,0,0,1
X=0
Y=0
W=200
H=200
PreserveAspectRatio=1
- Place it to the proper / desired position, by altering the X and Y values.
- Resize the image as you want, by the W (width) and H (height) options. Note here that the added PreserveAspectRatio=1 option ensures you that the image is not distorted.
-
- Posts: 4
- Joined: April 18th, 2024, 10:47 pm
Re: Mond skin - Adding Spotify album cover to player
Sorry for taking a bit to get back to you; got busy with life haha. This worked perfectly thank you so much for your help and @Yincognito as well.balala wrote: ↑April 19th, 2024, 7:26 pm To be little bit more specific than Yincognito, add the following measure to your code:This measure is returning the path to the cover art.Code: Select all
[MeasureCover] Measure=Plugin Plugin=WebNowPlaying PlayerType=COVER
Add an Image meter, to can get visible the cover. For instance this one:Obviously you have to adapt the above code, according to your needs. For example:Code: Select all
[MeterCover] Meter=Image MeasureName=MeasureCover SolidColor=0,0,0,1 X=0 Y=0 W=200 H=200 PreserveAspectRatio=1
Could you get this working?
- Place it to the proper / desired position, by altering the X and Y values.
- Resize the image as you want, by the W (width) and H (height) options. Note here that the added PreserveAspectRatio=1 option ensures you that the image is not distorted.
-
- Rainmeter Sage
- Posts: 8195
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Posts: 4
- Joined: April 18th, 2024, 10:47 pm
Re: Mond skin - Adding Spotify album cover to player
If I could get help with one more thing I would really appreciate it. I want to add a smooth scrolling effect to song titles/artists if they are too long/exceed a maximum width size, like in the clearskin skin. I tried to use the latest ver. (6.0 )of clearskin (https://github.com/redsaph/cleartext/releases/tag/6.0), but with my very limited rainmeter coding knowledge I just gave myself a headache and lost many hours of my life instead realized that sometimes you just gotta get help from the experts instead
Here is my updated spotify player code for reference:
Code: Select all
[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
[Variables]
@include=#@#Variables.inc
Scale=2.1
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeasureCover]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=COVER
[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ARTIST
Substitue="":""
[MeasureTitle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=TITLE
Substitue="":""
[MeasureAlbum]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ALBUM
Substitue="":""
[MeasureProgress]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=PROGRESS
[MeasureDuration]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=DURATION
[MeasurePosition]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=POSITION
[MeasureStateButton]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png"
[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasureDuration - MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasureDuration - MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeterTitle]
Meter=String
MeasureName=MeasureTitle
StringAlign=Left
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(6*#Scale#)
X=(55*#Scale#)
Y=(15*#Scale#)
W=0
H=0
Text="%1"
AntiAlias=1
Container=MeterTextContainer
[MeterArtist]
Meter=String
MeasureName=MeasureArtist
StringAlign=Left
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(55*#Scale#)
Y=(10*#Scale#)r
Text="%1"
AntiAlias=1
[MeterPosition]
Meter=String
MeasureName=MeasurePosition
StringAlign=Left
FontFace=Quicksand
FontColor=#TextColor#
FontSize=(4*#Scale#)
X=(10*#Scale#)
Y=(62.5*#Scale#)
AntiAlias=1
[MeterDuration]
Meter=String
MeasureName=MeasureDuration
StringAlign=Center
FontFace=Quicksand
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(185*#Scale#)
Y=(62.5*#Scale#)
AntiAlias=1
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeterBar]
Meter=Shape
X=(23*#Scale#)
Y=(65*#Scale#)
Shape=Rectangle 0,0,(150*#Scale#),(1*#Scale#),0 | Fill Color #TextColor#,30 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*1.5*#Scale#),(1*#Scale#),0 | Fill Color #TextColor# | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(1.2*#Scale#) |Fill Color #TextColor# | StrokeWidth 0
Shape4=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(3.4*#Scale#) |Fill Color #TextColor#,50 | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeterPrevious]
Meter=Image
ImageName=#@#Previous.png
X=(69*#Scale#)
Y=(75*#Scale#)
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Previous"]
[MeterPlayPause]
Meter=Image
ImageName=[MeasureStateButton]
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
SolidColor=0,0,0,1
ImageTint=#Color2#
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureStateButton" "PlayPause"]
[MeterNext]
Meter=Image
ImageName=#@#Next.png
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Next"]
[MeterCover]
Meter=Image
MeasureName=MeasureCover
SolidColor=0,0,0,1
X=0
Y=25
W=100
H=100
PreserveAspectRatio=1
-
- Rainmeter Sage
- Posts: 8195
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Mond skin - Adding Spotify album cover to player
Well, even us have to spend time on these things, so at times, if the matter was already discussed and reasonable results have already been achieved, we try to not reinvent the wheel every time a similar objective is mentioned, by providing some useful links, like this one:kiyeon wrote: ↑April 23rd, 2024, 2:42 pm If I could get help with one more thing I would really appreciate it. I want to add a smooth scrolling effect to song titles/artists if they are too long/exceed a maximum width size, like in the clearskin skin. I tried to use the latest ver. (6.0 )of clearskin (https://github.com/redsaph/cleartext/releases/tag/6.0), but with my very limited rainmeter coding knowledge I just gave myself a headache and lost many hours of my life instead realized that sometimes you just gotta get help from the experts instead
I've been reading old threads on this problem and came across threads that you and balala have been helping in. you guys have been helping so many members since years back it's kinda insane! so thank you once again for all your help to community members over the years
https://forum.rainmeter.net/viewtopic.php?t=31790
There, the structure is already build on a basic level, you could even leave only the 1st marquee related code to make it more compact and to understand it better. Once you do, you only need to apply it to your code, by copy pasting the measures doing the work, using similar variables as the X position in the desired meters, and obviously adjusting various section or variable names correspodingly. If after trying - at least on a rudimentar level, to see something happening - you still can't manage it, further help could be provided. Remember, "porting" something from one skin to another is not about copy pasting everything, but about "cherry picking" and copy pasting / adjusting only what you need.
Personally, I'm also a bit busy these days so I can't guarantee immediate assistance, but you might be able to get the idea. For the record, it's only about altering the "X" position of the meters displaying the desired texts, via an ActionTimer plugin animation, and also "masking" / "hiding" the undesired parts of the marquee via a container meter:
https://docs.rainmeter.net/manual/plugins/actiontimer/
https://docs.rainmeter.net/manual/meters/general-options/container/
It might seem complicated at first, but if you simplify the problem, it really isn't. Once you get one thing understood and working, the rest can follow.
-
- Rainmeter Sage
- Posts: 16568
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Mond skin - Adding Spotify album cover to player
You're welcome as well from my part.
Is Yincognito's above solution good for your needs? I'm sure it is...
Don't worry we're doing it with many pleasure (me personally at least for sure, but I think I can talk in Yincognito's name as well). Glad to help when can.kiyeon wrote: ↑April 23rd, 2024, 2:42 pm I've been reading old threads on this problem and came across threads that you and balala have been helping in. you guys have been helping so many members since years back it's kinda insane! so thank you once again for all your help to community members over the years