Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 24
[RELEASE] xbmclyrics script - automatically grabs lyrics online
#61
the quick and dirty fix worked.

what it does is that it does not wrap the text to the next line if it is too long. so you end up losing the text at the end of long lines of lyrics.

but that is much better than losing an entire line of lyrics due to overlapping Wink

good job! :thumbsup:
#62
now this certainly isn't the most elegant fix, but it sure helped.

(keeping in mind that i edited the file as posted above to remove word wrapping)

i changed this line:
Quote: def showcontrols(self):

self.textbox = xbmcgui.controltextbox(int(self.xratio*190),int(self.yratio*130),int(self.xratio*400),int(self.yratio*350), 'font14', '0xffffffff')
self.addcontrol(self.textbox) # starting in show_text mode

to this:
Quote: def showcontrols(self):

self.textbox = xbmcgui.controltextbox(int(self.xratio*190),int(self.yratio*130),int(self.xratio*500),int(self.yratio*350), 'font14', '0xffffffff')
self.addcontrol(self.textbox) # starting in show_text mode

...and it made the lines of text wider so that they extended beyond the borders of the on-screen text box graphic. it also results in the page up/down button being outside of the graphic as well. but at least now less text is cut off from long lines of lyrics.

another option would be to leave the text box size alone and shrink the font size..but for some people, it may make the lyrics more difficult to read. but, you can try this instead.

change:
Quote: def showcontrols(self):

self.textbox = xbmcgui.controltextbox(int(self.xratio*190),int(self.yratio*130),int(self.xratio*400),int(self.yratio*350), 'font14', '0xffffffff')
self.addcontrol(self.textbox) # starting in show_text mode

to:
Quote: def showcontrols(self):

self.textbox = xbmcgui.controltextbox(int(self.xratio*190),int(self.yratio*130),int(self.xratio*400),int(self.yratio*350), 'font10', '0xffffffff')
self.addcontrol(self.textbox) # starting in show_text mode

..or just change font10 to any font# you want to see if you can find the size that suits you best.



#63
well, the latest cvs still doesn't fix this issue even with the new python changes.

i have made a few changes that seem to fix the problem, although the fix involves adding a character to the end of each line...in this case i used '/' as is sometimes used in poetry.

anyway, here is the part that is fixed...it seems to be a great temporary fix...not perfect, but i know diddly about python.

Quote: def parse_lyrics(self, lyrics):
try:
query = re.compile('</font><br>(.*)<p><hr size=1', re.ignorecase | re.dotall)
full_lyrics = re.findall(query, lyrics)
self.final = full_lyrics[0].replace("\r","\\").replace("<br />"," ")
except:
try:
query = re.compile('</font><br>(.*)<br><br><a href="#', re.ignorecase | re.dotall)
full_lyrics = re.findall(query, lyrics)
self.final = full_lyrics[0].replace("\r","\\").replace("<br />"," ")
except:
print lyrics
self.final = "unusual page layout, no parsing built in yet..."
return str(self.final)



#64
thanks for the fixes.

when posting python scripts, some of the code can be messed up. ( eg. def --init--(self): )

it's better if you could post a zip and link to it. there are many free file hosting sites.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
#65
uploaded here:
http://rapidshare.de/files/19261839/xbmclyrics.zip.html

and please...let me know if it works or not so that i can get confirmation that it is not 'just my system' or if i need to tweak it a bit more.

i used it all day yesterday (it still doesn't make me a better singer :d) and had no problems whatsoever.
#66
actually, this bug is affecting all sorts of scripts.

e.g. xmbcmail - the text wrapping in e-mails is all screwed up in the exact same way.

e.g. xbmcscripts - the text wrapping in the script descriptions is overlapping also



#67
hi there. if there is someone that is developing on this script still, please consider to redo the code that detects media change. last time i checked the code. it had a codeloop that where sleeping and checking. there is a much more efficient way to do this.

http://www.xboxmediaplayer.de/cgi-bin....t=20234

:d
#68
just to update:

from the cvs
Quote: - 29-04-2006 fixed: [ 1478354 ] python "overlapping of lines"

so no need for these 'fixes' anymore..just update xbmc :d



#69
Question 
Just wondering if there is any work going into this anymore... great script but, 2005?

I am trying to update the image to go with my flavor of mc360... anyone interested?
#70
what do you mean "2005"? the guy just posted not even 2 months ago...
it works just fine for me, and i love it Smile
#71
The version at xbmcscripts is dated 2005... Is there a newer one??
#72
can sameone take a look?

XBMCLyrics - guibuilder
#73
Very nice smuto. Smile

I like the layout. Nice use of language files also.

The first script using guibuilder. Smile Any options you would like for that let me know. I added a fastMethod option, if True it won't use Includes.xml or References.xml. A slight speed improvement if your skin files don't have any <include> tags and all options are set.
#74
Lyrics - skin MC360

Image

problem
cover art for next song is not update
#75
this is great smuto, hope you can work out the problem with the cover art.
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 24

Logout Mark Read Team Forum Stats Members Help
[RELEASE] xbmclyrics script - automatically grabs lyrics online1