Lyrics Fetcher

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

T3KN0GH057
Posts: 8
Joined: Thu Jan 17, 2013 5:35 am

Re: Lyrics Fetcher

Post by T3KN0GH057 »

well you have source code? i could help...
bradscotsanders
Posts: 8
Joined: Mon Nov 19, 2007 6:38 pm

Re: Lyrics Fetcher

Post by bradscotsanders »

I just wanted to thank you for the incredible script. Works wonderfully. I do have an issue I am puzzled by...

I used your fix for the line breaks by editing the vbs file, but now my font is Roman, and doesn't match anything in my skin. Is there someplace that defines (or over-writes) the font in the Lyrics Viewer that is controlled by the Lyric Fetcher?

A great add-on. I would love add additional capabilities.
ACDias
Posts: 47
Joined: Wed Nov 30, 2011 3:46 pm
Location: Brazil

Re: Lyrics Fetcher

Post by ACDias »

on options there's some themes to choose for lyrics viewer.
You can edit the font of the theme in the CSS file (you'll need to know html + css to do this) located in C:\Users\{your user}\AppData\Roaming\MediaMonkey\Scripts\LyricsViewer\themes\{theme}
cmor153

Lyrics Fetcher Sources

Post by cmor153 »

I'd like to add websites or lyrics sources to Lyric Fetcher

For each source it needs 3 things
  • Name
    URL with {artist} {song}
    XPATH
If anyone has a list of sources with each of these 3 things I'd be happy.

Thanks
Last edited by Lowlander on Wed Feb 20, 2013 11:40 am, edited 1 time in total.
Reason: Merged with existing post
jonisaksson
Posts: 42
Joined: Fri Apr 20, 2007 11:02 am

Re: Lyrics Fetcher

Post by jonisaksson »

ACDias,

Sorry for being stupid but can you help me what I need to put in the xpath to get Plyrics to work?

I saw you posted the URL for plyrics but dont understand what I need to put in the xpath.

Many thanks for your help
Jon

Edit: Also how do I change it so it looks for Album artist rather than Artist?
ACDias
Posts: 47
Joined: Wed Nov 30, 2011 3:46 pm
Location: Brazil

Re: Lyrics Fetcher

Post by ACDias »

There's no way to look in Album Artist now... sry
Try this to find the right XPath:
1. Open Google Chrome and go to a lyrics page (Ex: http://www.azlyrics.com/lyrics/franzfer ... ehard.html)
2. Right click in the text and go to Inspect Element
3. On the bottom left there's an icon with a magnifier picture. Click in it.
4. Select the only the part of the website the contains all the text of the lyrics
5. It will select a node on the bottom panel here was this selected: <div style="margin-left:10px;margin-right:10px;">
6. Right click on the selected node and click Copy XPath. Ex: //*[@id="main"]/div[4]
7. Try it in the program (not guaranteed it will work, it's the simpler way to get the xpath)

PS: I didn't tested this XPath I've put above, so I don't know if it works...
doydaun
Posts: 1
Joined: Tue Apr 23, 2013 12:34 pm

Re: Lyrics Fetcher

Post by doydaun »

ACDias wrote:Hi, can you send me the song to see if it happens with me? And are you using MM4 right?

I've added a new version with new features. In context menu in the tray you can edit the lyrics and you can now edit what text will be shown when a song is instrumental.

About the line breaks issue. I think its because the LV renders the lyrics as an HTML and it does not replace the \r\n or \n to <br/> to show. I've changed the script to make it work but I'm not the author of the plugin so I can't fix it for you. If you want to try, open {MMInstallationDir}\Scripts\Auto\LyricsViewer.vbs in a text editor and search for LyrTxt=HtmlMarkup(Sng.Lyrics) and replace it for LyrTxt=Sng.Lyrics. Now search for Doc.Add " <p>" & LyrTxt & "</p>" and replace it for Doc.Add " <p><pre>" & LyrTxt & "</pre></p>". I'll talk to the author and see if he can update it...
Thanks, i used a different method. Just add new line in HtmlMarkup() function: HtmlMarkup=Replace(Txt,Chr(10),"<br>" & Chr(10)).

ACDias, it's very helpful, thanks a lot, and sorry for bad english.

Aqui é Brasil!
nikkodemus
Posts: 2
Joined: Thu May 09, 2013 10:09 pm

Re: Lyrics Fetcher

Post by nikkodemus »

Hey, total noob, don't know squat about Xpaths and Java script. t's a totally awesome app, I'm not complaining. Only if maybe it searched a couple of sites instead of just Terra. Like Terra first, and if it doesn't get it there, then it goes to another lyrics website?

I tried changing it in properties, but i've been fiddling with it for days with no success.

Also, maybe some way for it to automatically go through the library with me having to play each of the songs, and double check each one?
jonisaksson
Posts: 42
Joined: Fri Apr 20, 2007 11:02 am

Re: Lyrics Fetcher

Post by jonisaksson »

nikkodemus wrote:Hey, total noob, don't know squat about Xpaths and Java script. t's a totally awesome app, I'm not complaining. Only if maybe it searched a couple of sites instead of just Terra. Like Terra first, and if it doesn't get it there, then it goes to another lyrics website?

I tried changing it in properties, but i've been fiddling with it for days with no success.

Also, maybe some way for it to automatically go through the library with me having to play each of the songs, and double check each one?

I am stopped using Lyrics Fetcher as now using the awesome 4.1 of MediaMonkey... does all the lyrics fetching for you :)
ACDias
Posts: 47
Joined: Wed Nov 30, 2011 3:46 pm
Location: Brazil

Re: Lyrics Fetcher

Post by ACDias »

nikkodemus wrote:Hey, total noob, don't know squat about Xpaths and Java script. t's a totally awesome app, I'm not complaining. Only if maybe it searched a couple of sites instead of just Terra. Like Terra first, and if it doesn't get it there, then it goes to another lyrics website?

I tried changing it in properties, but i've been fiddling with it for days with no success.
For AZLyrics
URL: http://www.azlyrics.com/lyrics/{artist}/{song}.html
XPath: //*[@id="main"]/div[4]

Check artist lower case, artists remove spaces, song lower case, song remove spaces


I'm rebuilding the app, adding more features like fetch even when not playing.
nikkodemus
Posts: 2
Joined: Thu May 09, 2013 10:09 pm

Re: Lyrics Fetcher

Post by nikkodemus »

ACDias wrote:
nikkodemus wrote:Hey, total noob, don't know squat about Xpaths and Java script. t's a totally awesome app, I'm not complaining. Only if maybe it searched a couple of sites instead of just Terra. Like Terra first, and if it doesn't get it there, then it goes to another lyrics website?

I tried changing it in properties, but i've been fiddling with it for days with no success.
For AZLyrics
URL: http://www.azlyrics.com/lyrics/{artist}/{song}.html
XPath: //*[@id="main"]/div[4]

Check artist lower case, artists remove spaces, song lower case, song remove spaces

I'm rebuilding the app, adding more features like fetch even when not playing.

Thanks so much!!!!!!!!!!!! It was the xpath thing i didn't get right.
Only one more random question. I'm running all this music off my sd card. If I put mediamonkey beta on my android, the normal regular one from Google play, all the lyrics are saved to the songs themselves? Or is their an android version of lyrics fetcher and I run through my music again on my phone and re-download the lyrics?

And this is an awesome programme! Don't mind listening to all my music, because apparently i had some double copies of music with different tags. Already saved quarter gig, and I'm only in the Cs.
Thumbs up ACDias! You're a lifesaver, dude.

I am stopped using Lyrics Fetcher as now using the awesome 4.1 of MediaMonkey... does all the lyrics fetching for you


Looked for it, but all I could find was a debugging version. By experience Debug versions don't go well with my noob condition, lol. My eyes squint and my bowels tighten. But thanks for the suggestion and giving me that awesomeness to look forward to!

This has to be the best help forum ever. I was actually helped!!! By TWO people!!! :D This never happens!
ACDias
Posts: 47
Joined: Wed Nov 30, 2011 3:46 pm
Location: Brazil

Re: Lyrics Fetcher

Post by ACDias »

I don't know if you can see the lyrics from the android version. but yes. the lyrics are saved in the mp3 idv3 tag (so any player that shows this tag can see the saved lyrics, including android players - if they have such feature).


I didn't know Media Monkey is going to add a similar feature on the official version... So I'm gonna freeze developing until I see if the official version of this feature is good enough to deprecate my program. :)

There's a known issue when you have more than one source. It makes the URL wrong in the second try to get the lyrics... Until I fix it, put your primary source first because the next tries can fail...
Lowlander
Posts: 56589
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Lyrics Fetcher

Post by Lowlander »

ACDias wrote:I don't know if you can see the lyrics from the android version.
MediaMonkey for Android supports lyrics (swipe right to left on Artwork in Now Playing).
ArgGrr

Re: Lyrics Fetcher

Post by ArgGrr »

The above fix won't ignore imbedded HTML tags, so try this instead. In the LyricsViewer.vbs, replace the line:

Code: Select all

    HtmlMarkup=Replace(Txt,vbNewLine,"<br>" & vbNewLine & "                ")
with

Code: Select all

    HtmlMarkup=Replace(Txt,vbcr,"")
    HtmlMarkup=Replace(Txt,vblf,"<br>" & vbcrlf & "                ")
Its down about line 410.
It seems half the time it doesn't recognise the CRLF combo, even though they are there. Maybe it gets mangled somewhere.
So replacing the LF seems to work well for me.
Vrijheid 71

Re: Lyrics Fetcher

Post by Vrijheid 71 »

last week i discovered this script. Took me some time to understand it. But is owrks fine!
With the great help and patience of ACDias I was able to add some servers myself. I have a request for a change what will add a lot more servers.

A lot of lyric servers give a reply with a - or _ in the title as an answer. Is it possble to add replace space with - or _
example: bye-bye-love/the-beatles.html
or: bye_bye_love/the_beatles.html

soem site answer: /%digits/artist/title.html
wher %digits cab be 4 t9 7 digits. Is there a variable to trick this?

I did look for a MM 4.1 but i don not see any annoucement so where this message came from?

Grreting from the Netherlands.

Richard
Post Reply