summaryrefslogtreecommitdiff
path: root/testing/sonata/info.py.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-10-17 01:15:52 -0700
committerroot <root@rshg054.dnsready.net>2012-10-17 01:15:52 -0700
commitc84b2cd310f86dc50c4f52a5907cb17652e8c87c (patch)
treeef3dc614b68e1e6f5966a5d29f3970e27bb7c4f9 /testing/sonata/info.py.patch
parent99d0ec7ebad2eda5f3a03098962e3b250e3bef4c (diff)
Wed Oct 17 01:14:52 PDT 2012
Diffstat (limited to 'testing/sonata/info.py.patch')
-rw-r--r--testing/sonata/info.py.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/sonata/info.py.patch b/testing/sonata/info.py.patch
new file mode 100644
index 000000000..e95cc3a08
--- /dev/null
+++ b/testing/sonata/info.py.patch
@@ -0,0 +1,15 @@
+--- sonata/info.py 2011-07-05 22:32:08.452556016 -0500
++++ sonata/info.py 2011-07-05 22:45:50.849311466 -0500
+@@ -393,9 +393,9 @@
+ if content.startswith("#REDIRECT [["):
+ addr = "http://lyricwiki.org/index.php?title=%s&action=edit" % urllib.quote(content.split("[[")[1].split("]]")[0])
+ content = urllib.urlopen(addr).read()
+- lyrics = content.split("&lt;lyrics&gt;")[1].split("&lt;/lyrics&gt;")[0]
+- if lyrics.strip() != "&lt;!-- PUT LYRICS HERE (and delete this entire line) --&gt;":
+- lyrics = misc.unescape_html(lyrics)
++ content = misc.unescape_html(content)
++ lyrics = content.split("<lyrics>")[1].split("</lyrics>")[0].strip()
++ if lyrics.strip() != "<!-- PUT LYRICS HERE (and delete this entire line) -->":
+ lyrics = misc.wiki_to_html(lyrics)
+ lyrics = lyrics.decode("utf-8")
+ # Save lyrics to file: