[Rhythmbox-devel] Little patch for TerraLyrics parser



Hi.

I found very annoying that the lyrics fetched from Terra.br were
terribly formatted, so I modified TerraParser.py to delete those
annoying white spaces (actually, tabs) and line breaks before and
after the title and artist. Here is the patch code (for version 0.13.1
of Rhythmbox):

103,105d102
< 		rx = re.compile('^(\t|\n)+',re.M | re.S)
< 		artistitle = rx.sub('', artistitle)
<
110c107
< 		lyrics = unescape_entities(artistitle) + "\n" + unescape_entities(lyrics)
---
> 		lyrics = unescape_entities(artistitle) + unescape_entities(lyrics)


Thanks.

-- 
Matias Fernando Gea
matigea gmail com
http://www.mfgea.com.ar


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]