Wow!!! Thank you!!!!!eclectic-tech wrote:That can happen while testing skins that use webparser if you refresh the skin frequently... Restarting is the solution.
I was curious about the how often this site could find lyrics and created some code you may want to look at to see if any of it is of any use in your project.
This is a will display available lyrics, allow you to scroll in either direction at varying speeds (mousewheel), copy the lyrics to your clipboard (mid-click), or go to the MusixMatch site (left-click).
I modified the substitutes that FreeRaider provided; it will return the entire lyrics and not stop at '/' characters.
Here is some code for you to disect::
It is currently April 28th, 2024, 2:11 am
Spotify Lyrics help
-
- Posts: 94
- Joined: August 17th, 2016, 1:48 am
- Location: São Paulo - Brazil
Re: Spotify Lyrics help
-
- Rainmeter Sage
- Posts: 5407
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Spotify Lyrics help
No problem, good luck with your project!
Let us know if you have any other questions...
Getting lyrics is one of the those things that a lot of people want, but the sources are usually very difficult to parse and have a habit of changing formats... which breaks the skin
MusixMatch.com seems pretty consistent and I have found lyrics for the majority of titles I have tried, both oldies and Top 40!
So you may have a long run without needing updates
Edit: Here's my version I plan to add to my suite:
Let us know if you have any other questions...
Getting lyrics is one of the those things that a lot of people want, but the sources are usually very difficult to parse and have a habit of changing formats... which breaks the skin
MusixMatch.com seems pretty consistent and I have found lyrics for the majority of titles I have tried, both oldies and Top 40!
So you may have a long run without needing updates
Edit: Here's my version I plan to add to my suite:
You do not have the required permissions to view the files attached to this post.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 94
- Joined: August 17th, 2016, 1:48 am
- Location: São Paulo - Brazil
Re: Spotify Lyrics help
Nice looking skin!!
On the weekend I will update mine and post here.. took some from your code and also I am doing other .ini from diferent sources that will come up on musixmatch skin parse error.
the parsing from the lyrics sites is the most trick part indeed but I really like it lol!
On the weekend I will update mine and post here.. took some from your code and also I am doing other .ini from diferent sources that will come up on musixmatch skin parse error.
the parsing from the lyrics sites is the most trick part indeed but I really like it lol!
-
- Posts: 94
- Joined: August 17th, 2016, 1:48 am
- Location: São Paulo - Brazil
Re: Spotify Lyrics help
Hello eclectic-tech!
This is what I got so far, I will implement the controls and the link to the lyrics website as you did too, but I need to figure out the design I want yet..
I added 6 different lyrics sites, when one fails the another start immediately, and if the last one fail it gives the option to google the lyrics
Also got that nice slider thing from jsmorley skin, so I use my spotify skin to activate this lyrics skin
I still have to optimize it somehow... I just lost all I have writen due to a notepad++ crash (googled it seems to happen more often than I thought, be careful) so I did what I remembered and some adjusts to get it working again... LF to know your thoughts cya!
This is what I got so far, I will implement the controls and the link to the lyrics website as you did too, but I need to figure out the design I want yet..
I added 6 different lyrics sites, when one fails the another start immediately, and if the last one fail it gives the option to google the lyrics
Also got that nice slider thing from jsmorley skin, so I use my spotify skin to activate this lyrics skin
I still have to optimize it somehow... I just lost all I have writen due to a notepad++ crash (googled it seems to happen more often than I thought, be careful) so I did what I remembered and some adjusts to get it working again... LF to know your thoughts cya!
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
SkinWidth=512
SkinHeight=250
ContextTitle=Open @Includes folder
ContextAction=["#@#"]
DynamicVariables=1
OnRefreshAction=[!SnapEdges "0" "#CURRENTCONFIG#"][!WriteKeyValue Variables xSL "1" "#@#Variables.inc"][!SetVariable SL "1" "#ROOTCONFIG#\Spotify" "Spotify"]
OnCloseAction=[!WriteKeyValue Variables xSL "0" "#@#Variables.inc"][!SetVariable SL "0" "#ROOTCONFIG#\Spotify" "Spotify"][!SetVariable GOOGLE "0"]
[Variables]
ScrollSpeed=20
Height=230
@Include1=#@#GeneralVariables.inc
MaxNumber=0
GOOGLE=0
OffSet=-512
State=1
U=[!UpdateMeasure MeasureSlider][!UpdateMeter *][!Redraw]
[cCounter]
Measure = Calc
Formula = cCounter+1
IfAboveValue = #MaxNumber#
IfAboveAction = [!DisableMeasure #CURRENTSECTION#][!CommandMeasure MeasureSlider "Execute 1" ]
[cCounter2]
Measure = Calc
Formula = cCounter2+1
IfAboveValue = #MaxNumber#
IfAboveAction = [!DisableMeasure #CURRENTSECTION#][!DeactivateConfig "#ROOTCONFIG#\Lyrics"]
Paused=1
[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideRight, 20, 15
SlideRight=[!SetVariable State "2"][!SetVariable OffSet "(Clamp(#OffSet#+35,-512,0))"]#U#
ActionList2=Repeat SlideLeft, 10, 15
SlideLeft=[!SetVariable State "1"][!SetVariable OffSet "(Clamp(#OffSet#-35,-512,0))"]#U#
DynamicVariables=1
[StringStyle]
FontFace=#TextFont#
FontSize=11
FontColor=#LabelColor#
StringEffect=BORDER
AntiAlias=1
ClipString=2
StringStyle=Normal
StringAlign=Center
[MeterBack]
Meter=Image
ImageName=#ImagePath#FlexBack.png
Y=0
X=#OffSet#
W=512
H=250
ScaleMargins=3,3,3,3
ImageTint=#BackgroundColor#
DynamicVariables=1
MiddleMouseUpAction=[!SetClip "Title: [mTitleLyric]#CRLF#Artist: [mArtistLyric]#CRLF##CRLF#[mLyrics]"]
ToolTipText"Middle click to copy lyrics"
ToolTipType=1
ToolTipIcon=INFO
MouseActionCursor=0
[MeterText]
Meter=String
MeasureName=MeasureLyrics
MeterStyle=StringStyle
MouseScrollUpAction=[!SetOption MeterText y ([MeterText:y]<10?([MeterText:y]+#ScrollSpeed#):[MeterText:y])][!SetOption MeterText H ([MeterText:y]<10?[MeterText:H]-#ScrollSpeed#:[MeterText:H])][!Update]
MouseScrollDownAction=[!SetOption MeterText y ([MeterText:y]-#ScrollSpeed#)][!SetOption MeterText H ([MeterText:H]+#ScrollSpeed#)][!Update]
X=(#OffSet#+256)
Y=10
W=512
H=#Height#
DynamicVariables=1
SolidColor=0,0,0,1
MouseActionCursor=0
Hidden=#GOOGLE#
[MeasureGetLyrics]
Measure=Plugin
Plugin=WebParser
URL=https://www.musixmatch.com/lyrics/[&MeasureArtist]/[&MeasureTrack]
RegExp=(?siU).*"lyrics".*"body":"(.*)","
OnRegExpErrorAction=[!EnableMeasure MeasureGetVagalume][!SetOption MeterText MeasureName "MeasureVagalume"][!DisableMeasure MeasureGetLyrics]
DynamicVariables=1
UpdateRate=600
UpdateDivider=1
Paused=#GOOGLE#
[MeasureLyrics]
Measure=Plugin
Plugin=WebParser
URL=[MeasureGetLyrics]
StringIndex=1
DecodeCharacterReference=1
Substitute="":"#CRLF##CRLF##CRLF##CRLF##CRLF#Searching MusixMatch for Lyrics...","\n":"#CRLF#",'\"':"""
UpdateRate=600
UpdateDivider=-1
[MeasureTrack]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=TrackName
RegExpSubstitute=1
Substitute="\s-\s.*":"","\s\(.*":"","\s\[.*":"","":""," ":"-","\W+":"-","&":"And","--":"-"
OnChangeAction=[!SetVariable GOOGLE "0"][!CommandMeasure MeasureGetLyrics Update][!SetOption MeterText Y "10"][!SetOption MeterText H #Height#]
[MeasureArtist]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=ArtistName
Substitute="":""," ":"-","/":"-","&":"And","--":"-","KISS":"Kiss-2"
UpdateDivider=-1
[MeasureTrackG]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=TrackName
RegExpSubstitute=1
Substitute="\s-\s.*":"","\s\(.*":"","\s\[.*":"","":""," ":"+","\W+":"+","&":"And","--":"-"
OnChangeAction=[!CommandMeasure MeasureGetLyrics Update][!SetOption MeterText Y "10"][!SetOption MeterText H #Height#]
[MeasureArtistG]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=ArtistName
Substitute="":""," ":"+","/":"-","&":"And","--":"-"
UpdateDivider=-1
[MeterGoogle]
Meter=String
MeterStyle=StringStyle
FontColor=135,135,135
Text="No lyrics found, wanna Google it?"
LeftMouseUpAction=["https://www.google.com/search?q=[MeasureArtistG]+[MeasureTrackG]+lyrics"]
MouseOverAction=[!SetOption MeterGoogle FontColor "255,255,255"][!Update]
MouseLeaveAction=[!SetOption MeterGoogle FontColor "135,135,135"][!Update]
X=(#OffSet#+256)
Y=115
Hidden=(1-#GOOGLE#)
DynamicVariables=1
; **********************************************
; VAGALUME
; **********************************************
[MeasureGetVagalume]
Measure=Plugin
Plugin=WebParser
URL=https://www.vagalume.com.br/[&MeasureArtistMetrolyrics]/[&MeasureTrackMetrolyrics].html
RegExp=(?siU).*description>(.*)<\/div>
OnRegExpErrorAction=[!EnableMeasure MeasureGetMetrolyrics][!SetOption MeterText MeasureName "MeasureMetrolyrics"][!DisableMeasure MeasureGetVagalume]
DynamicVariables=1
UpdateRate=600
UpdateDivider=1
Disabled=1
[MeasureVagalume]
Measure=Plugin
Plugin=WebParser
URL=[MeasureGetVagalume]
StringIndex=1
DecodeCharacterReference=1
Substitute="":"#CRLF##CRLF##CRLF##CRLF##CRLF#Buscando letra no Vagalume...","<br/>":"#CRLF#",'\"':"""
UpdateRate=600
UpdateDivider=-1
; **********************************************
; Metrolyrics
; **********************************************
[MeasureGetMetrolyrics]
Measure=Plugin
Plugin=WebParser
URL=http://www.metrolyrics.com/[&MeasureTrackMetrolyrics]-lyrics-[&MeasureArtistMetrolyrics].html
RegExp=(?siU).*'verse'>(.*)<\/div>
OnRegExpErrorAction=[!EnableMeasure MeasureGetMetallyrica][!SetOption MeterText MeasureName "MeasureMetallyrica"][!DisableMeasure MeasureGetMetrolyrics]
DynamicVariables=1
UpdateRate=600
UpdateDivider=1
Disabled=1
[MeasureMetrolyrics]
Measure=Plugin
Plugin=WebParser
URL=[MeasureGetMetrolyrics]
StringIndex=1
RegExpSubstitute=1
DecodeCharacterReference=1
Substitute="":"#CRLF##CRLF##CRLF##CRLF##CRLF#Searching Metrolyrics for Lyrics...","<br>":"","</p>.*>":"#CRLF##CRLF#","</p>":""
UpdateRate=600
UpdateDivider=-1
[MeasureTrackMetrolyrics]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=TrackName
RegExpSubstitute=1
Substitute="A":"a","B":"b","C":"c","D":"d","E":"e","F":"f","G":"g","H":"h","I":"i","J":"j","K":"k","L":"l","M":"m","N":"n","O":"o","P":"p","Q":"q","R":"r","S":"s","T":"t","U":"u","V":"v","W":"w","X":"x","Y":"y","Z":"z","\s-\s.*":"","\s\(.*":"","\s\[.*":"","":""," ":"-","\W+":"-","&":"And","--":"-"
[MeasureArtistMetrolyrics]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=ArtistName
Substitute="A":"a","B":"b","C":"c","D":"d","E":"e","F":"f","G":"g","H":"h","I":"i","J":"j","K":"k","L":"l","M":"m","N":"n","O":"o","P":"p","Q":"q","R":"r","S":"s","T":"t","U":"u","V":"v","W":"w","X":"x","Y":"y","Z":"z","":""," ":"-","/":"-","&":"And","--":"-"
; **********************************************
; Metallyrica
; **********************************************
[MeasureGetMetallyrica]
Measure=Plugin
Plugin=WebParser
URL=http://www.metallyrica.com/lyrica/[&MeasureArtistMetallyrica]/[&MeasureTrackMetallyrica].html
RegExp=(?siU).*[MeasureTrackName]<\/b>.*color=.*>(.*)<\/
OnRegExpErrorAction=[!EnableMeasure MeasureGetAZLyrics][!SetOption MeterText MeasureName "MeasureAZLyrics"][!DisableMeasure MeasureGetMetallyrica]
DynamicVariables=1
UpdateRate=600
UpdateDivider=1
Disabled=1
[MeasureMetallyrica]
Measure=Plugin
Plugin=WebParser
URL=[MeasureGetMetallyrica]
StringIndex=1
RegExpSubstitute=1
DecodeCharacterReference=1
Substitute="":"#CRLF##CRLF##CRLF##CRLF##CRLF#Searching Metallyrica.com for Lyrics...","<br>":"#CRLF#",""":'"'
UpdateRate=600
UpdateDivider=-1
[MeasureTrackName]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=TrackName
RegExpSubstitute=1
DynamicVariables=1
DisableLeadingZero=1
Substitute="":"No Song Found","\s-\s.*":"","\s\(.*":"","\s\[.*":"","":""
[MeasureTrackMetallyrica]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=AlbumName
RegExpSubstitute=1
Substitute="A":"a","B":"b","C":"c","D":"d","E":"e","F":"f","G":"g","H":"h","I":"i","J":"j","K":"k","L":"l","M":"m","N":"n","O":"o","P":"p","Q":"q","R":"r","S":"s","T":"t","U":"u","V":"v","W":"w","X":"x","Y":"y","Z":"z","\s-\s.*":"","\s\(.*":"","\s\[.*":"","":""," ":"_","\W+":"_"
[MeasureArtistMetallyrica]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=ArtistName
Substitute="A":"a","B":"b","C":"c","D":"d","E":"e","F":"f","G":"g","H":"h","I":"i","J":"j","K":"k","L":"l","M":"m","N":"n","O":"o","P":"p","Q":"q","R":"r","S":"s","T":"t","U":"u","V":"v","W":"w","X":"x","Y":"y","Z":"z","\s-\s.*":"","\s\(.*":"","\s\[.*":"","":""," ":"_","\W+":"_"
; **********************************************
; AZLyrics
; **********************************************
[MeasureGetAZLyrics]
Measure=Plugin
Plugin=WebParser
URL=http://www.azlyrics.com/lyrics/[&MeasureArtistAZLyrics]/[&MeasureTrackAZLyrics].html
RegExp=(?siU).*<div>.*-->(.*)</div>
;RegExp="(?siU)<div>(.*)</div>.*"
OnRegExpErrorAction=[!EnableMeasure MeasureGetDarkLyrics][!SetOption MeterText MeasureName "MeasureDarkLyrics"][!DisableMeasure MeasureGetAZLyrics]
DynamicVariables=1
UpdateRate=600
UpdateDivider=1
Disabled=1
[MeasureAZLyrics]
Measure=Plugin
Plugin=WebParser
URL=[MeasureGetAZLyrics]
StringIndex=1
DecodeCharacterReference=1
Substitute="":"#CRLF##CRLF##CRLF##CRLF##CRLF#Searching AZLyrics.com for Lyrics...","<br>":""
UpdateRate=600
UpdateDivider=-1
[MeasureTrackAZLyrics]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=TrackName
RegExpSubstitute=1
Substitute="A":"a","B":"b","C":"c","D":"d","E":"e","F":"f","G":"g","H":"h","I":"i","J":"j","K":"k","L":"l","M":"m","N":"n","O":"o","P":"p","Q":"q","R":"r","S":"s","T":"t","U":"u","V":"v","W":"w","X":"x","Y":"y","Z":"z","\s-\s.*":"","\s\(.*":"","\s\[.*":"","":""," ":"","\W+":""
[MeasureArtistAZLyrics]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=ArtistName
Substitute="A":"a","B":"b","C":"c","D":"d","E":"e","F":"f","G":"g","H":"h","I":"i","J":"j","K":"k","L":"l","M":"m","N":"n","O":"o","P":"p","Q":"q","R":"r","S":"s","T":"t","U":"u","V":"v","W":"w","X":"x","Y":"y","Z":"z","\s-\s.*":"","\s\(.*":"","\s\[.*":"","":""," ":"","\W+":""
; **********************************************
; DarkLyrics
; **********************************************
[MeasureGetDarkLyrics]
Measure=Plugin
Plugin=WebParser
URL=http://www.darklyrics.com/lyrics/[&MeasureArtistAZLyrics]/[&MeasureAlbumDarkLyrics].html
RegExp=(?siU).*"lyrics">.*[MeasureTrackName]<\/a><\/h3><br \/>(.*)\/><
;RegExp=(?siU).*[MeasureTrackDarkLyricsName]<\/a><\/h3><br \/>(.*)<h3>.*
OnRegExpErrorAction=[!EnableMeasure MeasureGetLyrics][!SetOption MeterText MeasureName "MeasureLyrics"][!SetVariable GOOGLE "1"][!DisableMeasure MeasureGetDarkLyrics]
DynamicVariables=1
UpdateRate=600
UpdateDivider=1
Disabled=1
[MeasureDarkLyrics]
Measure=Plugin
Plugin=WebParser
URL=[MeasureGetDarkLyrics]
StringIndex=1
RegExpSubstitute=1
DecodeCharacterReference=1
Substitute="":"#CRLF##CRLF##CRLF##CRLF##CRLF#Searching DarkLyrics.com for Lyrics...","<br />":"","<br ":"","<i>":"","</i>":""
UpdateRate=600
UpdateDivider=-1
[MeasureAlbumDarkLyrics]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=AlbumName
RegExpSubstitute=1
Substitute="A":"a","B":"b","C":"c","D":"d","E":"e","F":"f","G":"g","H":"h","I":"i","J":"j","K":"k","L":"l","M":"m","N":"n","O":"o","P":"p","Q":"q","R":"r","S":"s","T":"t","U":"u","V":"v","W":"w","X":"x","Y":"y","Z":"z","\s-\s.*":"","\s\(.*":"","\s\[.*":"","":""," ":"","\W+":"","&":"And","--":""
-
- Rainmeter Sage
- Posts: 5407
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Spotify Lyrics help
I will take a look at this and let you know if I have any suggestions... may not be for a few days, but I will definitely keep an eye on your progress...
I posted a suggestion concerning your 'terrible' experience thread. Sadly, we all learn things the hard way
I posted a suggestion concerning your 'terrible' experience thread. Sadly, we all learn things the hard way
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 5407
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Spotify Lyrics help
Can you post the contents of your '@Resources\GeneralVariables.inc' file?winterwulf wrote:Hello eclectic-tech!
This is what I got so far, I will implement the controls and the link to the lyrics website as you did too, but I need to figure out the design I want yet..
Or you could make a complete rmskin package to include images, @includes files, etc.
Either way should give me a more complete skin to work with...
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 94
- Joined: August 17th, 2016, 1:48 am
- Location: São Paulo - Brazil
Re: Spotify Lyrics help
https://dl.dropboxusercontent.com/u/9080823/Spotify%2BLyrics_.rmskineclectic-tech wrote:Can you post the contents of your '@Resources\GeneralVariables.inc' file?
Or you could make a complete rmskin package to include images, @includes files, etc.
Either way should give me a more complete skin to work with...
hope this works, never did a .rmskin before.
I did it based on jsmorley skins design (since I use it on my desktop, I did my skins to match the same design) I hope there is no problem with it.
Would
Code: Select all
OnChangeAction=[!CommandMeasure MeasureGetLyrics Update]
Code: Select all
OnChangeAction=[!Refresh]
EDIT:
Thank you very much!I will take a look at this and let you know if I have any suggestions... may not be for a few days, but I will definitely keep an eye on your progress...
I posted a suggestion concerning your 'terrible' experience thread. Sadly, we all learn things the hard way
EDIT2: Since I gave you the spotify skin on the rmskin package, you can load it and activate the lyrics by clicking on the note Icon (♪ appears on mouse over)
-
- Posts: 2
- Joined: January 8th, 2017, 11:07 pm
Re: Spotify Lyrics help
Hi there. I've used the SCaLPI v2.5 lyrics skin (which uses the NowPlaying.dll) for a while now, but lately it hasn't been able to find all the lyrics for the song I listen.winterwulf wrote:https://dl.dropboxusercontent.com/u/9080823/Spotify%2BLyrics_.rmskin
hope this works, never did a .rmskin before.
I did it based on jsmorley skins design (since I use it on my desktop, I did my skins to match the same design) I hope there is no problem with it.
So your idea for redundancy search is really appealing - except I use the AIMP3 player, instead of Spotify. Would it be possible to convert this from using the SpotifyPlugin.dll to the NowPlaying.dll?
I tried to mess with it a little bit, but my programming skills are a little rusty. Any help would be more than welcome.
-
- Posts: 94
- Joined: August 17th, 2016, 1:48 am
- Location: São Paulo - Brazil
Re: Spotify Lyrics help
Hi Romulo, sure, I can do that! I am not able to do it early this week though, I am handling some problems with my house, but I believe that I can show you something by the weekend and explain how tweak it whenever you need. =)romulosinner wrote:Hi there. I've used the SCaLPI v2.5 lyrics skin (which uses the NowPlaying.dll) for a while now, but lately it hasn't been able to find all the lyrics for the song I listen.
So your idea for redundancy search is really appealing - except I use the AIMP3 player, instead of Spotify. Would it be possible to convert this from using the SpotifyPlugin.dll to the NowPlaying.dll?
I tried to mess with it a little bit, but my programming skills are a little rusty. Any help would be more than welcome.
cheers!
-
- Posts: 2
- Joined: January 8th, 2017, 11:07 pm
Re: Spotify Lyrics help
Great! You're life saver, bud!winterwulf wrote:Hi Romulo, sure, I can do that! I am not able to do it early this week though, I am handling some problems with my house, but I believe that I can show you something by the weekend and explain how tweak it whenever you need. =)
cheers!