[RELEASE] xbmclyrics script - automatically grabs lyrics online - 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] xbmclyrics script - automatically grabs lyrics online (/showthread.php?tid=10187)
[RELEASE] xbmclyrics script - automatically grabs lyrics online - EnderW - 2005-02-25 03:34
xbmclyrics is a script which will grab lyrics from http://www.lyrc.com.ar for the song you are currently playing. it is not a final release, but as i am going away for some days i decided to release it now. there are a lot of bugs i am sure, please report them.
there is one feature that is planned, but i haven't got it done yet. this is automatic updating of lyrics as song changes. i will add that later. the script looks best with pm1 or pm2 as it uses chokemaniac's panel as base (thanks cm). for easy access i suggest either adding it to the submenu or mapping it to a button using keymap.xml (this is possible, right? )
not much more left to say then i guess, i hope you find some use in it. enjoy!
- Tomkun - 2005-02-26 05:11
first of all, great script! i can see this is gonna be a good one, but for now i have found a couple of bugs...
1) the panel doesn't show up. this means it just overlays on the current screen, which can make it difficult to read.
2) it doesn't size correctly for my ntsc tv. i guess it was sized for pal? is there a way to make it automatically resize?
3) if the song lyrics don't exist on the website, it will display the lyrics of a different song by the same artist. i checked the website and it does it too. i don't know if you could fix that in the script somehow?
other that that, this seems to be a great script! well done!
- Tomkun - 2005-02-26 05:19
ok, referring to point (1) above, i found the problem. i was running the script from a subdirectory in the scripts folder, but the script looks for the image in the scripts folder only. i edited the script to reflect the change and it works fine now. is there a way to make this automatic?
- Tomkun - 2005-02-26 06:00
ok, me again.
referring to point (2) above, i have been fiddling about with the settings for my ntsc tv. i have found some good sizes for ntsc. if you have an ntsc tv, change :
Quote: self.addcontrol(xbmcgui.controlimage(158,20,520,420, 'q:\\scripts\\xbmclyrics\\lyricspanel.png'))
it should fit much better!
- pop - 2005-02-26 12:06
this is mint well done :bowdown:
- solexalex - 2005-02-26 14:41
hi ! i did not test your script yet ...
anyway, i changed a couple os things to make it instalable anywhere :
Quote:import oson a new line where you can see other import
Quote: self.home=os.getcwd()[:-1]+'\\'on a new line just after def in the overlay class
replace the line (a couple of lines after) :
Quote: self.addcontrol(xbmcgui.controlimage(158,25,520,500, 'q:\\scripts\\lyricspanel.png'))with :
Quote: self.addcontrol(xbmcgui.controlimage(158,25,520,500, self.home+'lyricspanel.png'))
as for the autosize to fit any screen, it is easy to do, but a bit longer... i will do it if none of you made it before.
- EnderW - 2005-02-27 22:08
(tomkun @ feb. 26 2005,03:11 Wrote:2) it doesn't size correctly for my ntsc tv. i guess it was sized for pal? is there a way to make it automatically resize?2.
i am not too sure on how i would implement that. i could put in an "if" check on the resolution, but that's perhaps not the best implementation (by far the easiest though, so i might go with that).
this isn't really something i can do anything about. i might expand the script to work with different sites later, but as it is now it pretty much works just like lyrc.com.ar. if that site gives a wrong, so does the script. lyrc.com.ar has a pretty bad search engine, so it gives wrong quite often if it can't find the actual song.
i will update the script soon (a day or two) with the location fix (thanks solexalex) and probably a size fix.
- solexalex - 2005-02-28 02:21
to make your script fit any screen size, try this tricks :
1- get the screensize :
2- you know that you made the skin in your own format (i guess it is pal format so 720x540 ; ntsc is 720x480). so the sizes you gave in your script are for pal screen.
just calculate a 'ratio' between your screen size and any other size : (your size is the reference)
3- now you'll have to tell all objects, taht x;y positions and w/h size have to be modified with the ratio. don't forget to say the result should be integer
self.fadelabel = xbmcgui.controlfadelabel(int(xratio*270),int(yratio*95),int(xratio*255),int(yratio*25), 'font14','0xffffffff')
notice that xratio apply to x position and width
yratio apply to y positions and height
maybe sometimes, you'll prefer to make a position 'fixed' so play a bit wether you should use ratio for a value or not !
i hope this can be understandable...(i.e can you understand what i'm trying to explain )
- luciverse - 2005-03-01 11:13
link has expired.
- erpi99 - 2005-03-01 20:03
can it be added to the scriptrunner?