XBMC Community Forum
[RELEASE] CU Lyrics (Script) Addon - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Lyrics Add-ons (/forumdisplay.php?fid=146)
+---- Thread: [RELEASE] CU Lyrics (Script) Addon (/showthread.php?tid=62853)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38


- ZorMonkey - 2010-01-26 16:59

dny238 Wrote:Are you guys always upper casing stuff? I figured we'd try the default title and 'try again' with capitalization if there was a lookup issue. Maybe that's unnecessarily complex.

The way we're looking for lyrics needs the first letter of every word capitalized. But there are other options. For example, we could leverage what is left of their API. Here's an example of a query for a song with messed up capitalization, which returns good results: http://lyrics.wikia.com/api.php?func=getSong&artist=breaking%20benjamin&song=until%20The%20EnD&fmt=xml


Quote:Quick question, what are you doing with songs with Featuring Jay-Z in them? Is there a standard approach to that type of thing on LyricsWiki?

I'm not doing anything special. My hunch is that LyricsWiki is happy with that coming through as "Jay-Z"

Quote:2nd question, whose issue is it that i'm seeing HTML encoding on tracks like http://lyrics.wikia.com/index.php?title=Carrie%20Underwood:Before%20He%20Cheats&action=edit? " is visible and there are double quotes sometimes.

I can't easily check right now, but I'm willing to bet that's because the lyrics have been formatted to have bold and/or italics in them. That's one of the next things on my list.


- ZorMonkey - 2010-01-26 17:05

dny238 Wrote:ZorMonkey,
Question for you about scripts. It seems like there could be a threading issue somewhere. Let me setup the scene.
1) I have a directory of songs I've never played before
2) I play the first song, and the system gets its lyrics and starts to get the next one.
3) Before the results are back I hit next 2x, skipping over the song which is currently being loaded.
4) I want to immediately see a "Fetching lyrics..." message, but I don't.
5) On my system it takes about 9 seconds. So for 9 seconds I'm stuck looking at the lyrics from the song 2 clicks ago.

Yeah, I hate that too. Smile There are a few problem in there, which could possibly be solved with more threading, but I'm not sure yet. One big thing is that we have to do some weird stuff to get the artist and title for the currently playing song. After XBMC tells us that the song has changed it can take a while for it to tell us what that song is. Don't know why, but I want to blame XBMC for that. The skin knows what the song is immediately, so why wont XBMC tell us what the song is immediately? I dunno.

Quote:PS. Found one bug, for some reason the I've became i've.
SCRAPER-DEBUG: LyricsFetcher.get_lyrics_thread Artist: Linkin Park, Title: What I've Done
14:59:55 T:2805619600 M:513093632 NOTICE: http://lyricwiki.org/index.php?title=Linkin%20Park:What%20i%27ve%20Done&fmt=js

Huh, I'll check it out later


- dny238 - 2010-01-27 12:08

ZorMonkey Wrote:Yeah, I hate that too. Smile There are a few problem in there, which could possibly be solved with more threading, but I'm not sure yet. One big thing is that we have to do some weird stuff to get the artist and title for the currently playing song. After XBMC tells us that the song has changed it can take a while for it to tell us what that song is. Don't know why, but I want to blame XBMC for that. The skin knows what the song is immediately, so why wont XBMC tell us what the song is immediately? I dunno.

All I want is to put up "Fetching Lyrics..." as soon as we possibly can. It doesn't bother me that it takes 10 seconds to respond. I'd be nice if it didn't... but i'm not greedy. Mostly I just want to take the wrong lyrics off the screen.

Rob


- ZorMonkey - 2010-01-27 15:43

dny238 Wrote:All I want is to put up "Fetching Lyrics..." as soon as we possibly can. It doesn't bother me that it takes 10 seconds to respond. I'd be nice if it didn't... but i'm not greedy. Mostly I just want to take the wrong lyrics off the screen.

Rob

Yeah, I'll see what I can figure out. The reason I don't automatically clear the lyrics and display "Fetching Lyrics..." is because in certain cases it may already be displaying the lyrics you want. I don't remember the exact scenario - I'll have to verify. Although, I suppose whatever that scenario is should be fairly uncommon, so maybe it's overkill to even worry about it. I also noticed that I have it sleeping for way too long - that can't help.

BTW - your problem with "I've" that I thought I fixed is fixed for real with this, I hope. Smile

Code:
def lyricwiki_format(self, text):
        titleCase =lambda value: re.sub("([a-zA-Z]')([A-Z])", lambda m: m.group(0) + m.group(1).lower(), value.title())
        return urllib.quote(str(unicode(titleCase(text))))



- lonchaney - 2010-02-02 03:42

sorry if this is wrong place to post this

i was wondering if anyone knows a way i can press a button on my remote and have the script come up and show me the lyrics of the song i'm playing? i'm running aeon65 and when i play music i just go back to the home screen (no visualization or anything). i wanna be able to just hit a button on my remote and have the lyrics pop up...is this possible?

thanks.


- ronie - 2010-02-02 09:52

lonchaney Wrote:sorry if this is wrong place to post this

i was wondering if anyone knows a way i can press a button on my remote and have the script come up and show me the lyrics of the song i'm playing? i'm running aeon65 and when i play music i just go back to the home screen (no visualization or anything). i wanna be able to just hit a button on my remote and have the lyrics pop up...is this possible?

thanks.

not tested by me, but i guess you should be able to map this action to a button:
XBMC.RunScript(/path/to/script)


- lonchaney - 2010-02-03 01:30

ronie Wrote:not tested by me, but i guess you should be able to map this action to a button:
XBMC.RunScript(/path/to/script)

i use eventghost and i'm not sure what you mean...any chance of an explanation? also, how does everyone else use this script? i love the idea of having the lyrics when playing a song but i'm curious how people implement the script


- ronie - 2010-02-03 01:53

lonchaney Wrote:i use eventghost and i'm not sure what you mean...any chance of an explanation? also, how does everyone else use this script? i love the idea of having the lyrics when playing a song but i'm curious how people implement the script

most skins have a button on the music osd to launch this script.

i have no experience with eventghost, but have a look at xbmc/system/keymaps/remote.xml
copy this file to xbmc/userdata/keymaps/remote.xml and you should be able to modify it to your own liking.


- thomash72 - 2010-02-09 22:21

I love the fact that the CU Lyrics scrip is able to provide me with Lyrics when listening to Shoutcast radio.
Two minor requests:
1. When a new song start to play in a Shoutcast radiostream I have to manually turn CU Lyrics off/on again in order to get it to search for lyrics for the new song.
2. When a song does not have first letter in each word capitalized CU Lyrics does not seem to find any lyrics.

But overall CU Lyrics combined with Transparency! is a killer combination:-)


- djvj - 2010-04-14 21:51

Script works great, thanks!

I noticed a lot of songs do not have lyrics, I know this is not your fault, but are there multiple sources that can be scraped to potentially find a match?

Also I have many songs that have (explicit) in the song name to denote that it's the adult version. These seem to never pull lyrics. Is the script searching for this in the song name or is it discarded? If it is maybe give an option or make it discard data in parenthesis and brackets.