diff --git a/amarok-parse-lyricwiki-website.patch b/amarok-parse-lyricwiki-website.patch
new file mode 100644
index 0000000..b3e8cac
--- /dev/null
+++ b/amarok-parse-lyricwiki-website.patch
@@ -0,0 +1,56 @@
+diff --git a/src/scripts/lyrics_lyricwiki/main.js b/src/scripts/lyrics_lyricwiki/main.js
+index bce329c..d2b9902 100644
+--- a/src/scripts/lyrics_lyricwiki/main.js
++++ b/src/scripts/lyrics_lyricwiki/main.js
+@@ -27,6 +27,31 @@ Importer.loadQtBinding( "qt.core" );
+ Importer.loadQtBinding( "qt.xml" );
+
+ xml = "{lyrics}";
++newxml = "";
++
++function onFinished2( response )
++{
++ try
++ {
++ if( response.length == 0 )
++ Amarok.Lyrics.showLyricsError( "Unable to contact server - no website returned" ); // TODO: this should be i18n able
++ else
++ {
++ doc2 = new QDomDocument();
++ doc2.setContent( response );
++ textboxtext = doc2.elementsByTagName( "textarea" ).at( 0 ).toElement().text();
++ lyr = /(.*)<\/lyrics>/.exec(textboxtext)[1];
++ //Amarok.debug( "matched: " + lyr );
++ newxml = newxml.replace( "{lyrics}", Amarok.Lyrics.escape( lyr ) );
++ Amarok.Lyrics.showLyrics( newxml );
++ }
++ }
++ catch( err )
++ {
++ Amarok.Lyrics.showLyricsError( "Could not retrieve lyrics: " + err );
++ Amarok.debug( "error: " + err );
++ }
++}
+
+ function onFinished( dat )
+ {
+@@ -38,13 +63,14 @@ function onFinished( dat )
+ {
+ doc = new QDomDocument();
+ doc.setContent( dat );
+- parsedContent = doc.elementsByTagName( "lyrics" ).at( 0 ).toElement().text();
+- parsedContent = parsedContent.replace( "", "" ).replace( "", "" ); // some lyrics have 2 lyrics in them...wtf?
+ newxml = xml.replace( "{artist}", Amarok.Lyrics.escape( doc.elementsByTagName( "artist" ).at( 0 ).toElement().text() ) );
+ newxml = newxml.replace( "{title}", Amarok.Lyrics.escape( doc.elementsByTagName( "song" ).at( 0 ).toElement().text() ) );
+- newxml = newxml.replace( "{lyrics}", Amarok.Lyrics.escape( parsedContent ) );
+- //Amarok.debug( "showing lyrics:" + newxml );
+- Amarok.Lyrics.showLyrics( newxml );
++ Amarok.debug( "returned URL: " + doc.elementsByTagName( "url" ).at( 0 ).toElement().text());
++ var url = decodeURI(doc.elementsByTagName( "url" ).at( 0 ).toElement().text());
++ url = url.replace( /lyricwiki\.org\//, "lyricwiki.org/index.php?action=edit&title=" );
++ var url2 = new QUrl(url);
++ Amarok.debug( "request-2 URL: " + url2.toString() );
++ new Downloader( url2, onFinished2 );
+ }
+ }
+ catch( err )
diff --git a/amarok.spec b/amarok.spec
index b29cc35..ee88664 100644
--- a/amarok.spec
+++ b/amarok.spec
@@ -2,7 +2,7 @@
Name: amarok
Summary: Media player
Version: 2.1.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Group: Applications/Multimedia
License: GPLv2+
@@ -12,11 +12,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch50: amarok-2.0.90-qtscript_not_required.patch
-# svn diff \
-# svn://anonsvn.kde.org/home/kde/tags/amarok/2.0.96/amarok/ \
-# svn://anonsvn.kde.org/home/kde/trunk/extragear/multimedia/amarok/
-# and manually tweaked a bit to apply
-#Patch100: amarok-%{snap}svn.patch.gz
+## upstream patches
+# https://bugs.kde.org/show_bug.cgi?id=202366
+Patch100: amarok-parse-lyricwiki-website.patch
BuildRequires: curl-devel
BuildRequires: desktop-file-utils
@@ -69,6 +67,7 @@ Obsoletes: amarok-utilities < 2.0.96
%setup -q
%patch50 -p1 -b .qtscript_not_required
+%patch100 -p1 -b .lyricwiki
%build
@@ -150,6 +149,9 @@ fi
%changelog
+* Sat Aug 08 2009 Rex Dieter 2.1.1-4
+- lyricwiki patch (kdebug#202366)
+
* Fri Jul 24 2009 Fedora Release Engineering - 2.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild