Created
August 4, 2009 09:25
-
-
Save shashi/161130 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ugly hack for LyricWiki API. | |
# Steps: | |
# Open /usr/lib/python2.6/site-packages/sonata/info.py | |
# (python2.5, or any proper version should be substituted) | |
# Search for: | |
# "lyrics = self.lyricServer.getSong" | |
# Add this in the next line: | |
lyrics = urllib.urlopen("http://lyricwiki.org/"+self.lyricwiki_format(search_artist)+":"+self.lyricwiki_format(search_title)).read().split("<div class='lyricbox' >")[1].split("</div>")[0].replace('<br />',"\n") | |
# Care to indent it as the above line. | |
# In versions greater than 1.6 you can place this line | |
# carefully in an appropriate position so | |
# that the "lyrics" variable get the lyrics b4 being printed | |
# or written into cache file. | |
# NOTE: This only works for Sonata 1.6, | |
# I don't think it will work for any other version. | |
# This is a temperory fix. Be sure to update sonata | |
# when update is available, then the problem will | |
# be permanently (hopefully) fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment