rpms/amarok/F-11 amarok-2.1.1-lyricwiki.patch, NONE, 1.1 amarok.spec, 1.150, 1.151 amarok-parse-lyricwiki-website.patch, 1.1, NONE
Rex Dieter
rdieter at fedoraproject.org
Wed Sep 2 17:19:09 UTC 2009
- Previous message (by thread): rpms/cd-discid/devel .cvsignore, 1.3, 1.4 cd-discid.spec, 1.12, 1.13 sources, 1.3, 1.4
- Next message (by thread): rpms/amarok/devel amarok-2.1.80-lyricwiki.patch, NONE, 1.1 .cvsignore, 1.48, 1.49 amarok.spec, 1.160, 1.161 sources, 1.49, 1.50 amarok-parse-lyricwiki-website.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rdieter
Update of /cvs/pkgs/rpms/amarok/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15497
Modified Files:
amarok.spec
Added Files:
amarok-2.1.1-lyricwiki.patch
Removed Files:
amarok-parse-lyricwiki-website.patch
Log Message:
* Wed Sep 02 2009 Rex Dieter <rdieter at fedoraproject.org> 2.1.1-5
- lyricwiki patch respin (kdebug#202366)
amarok-2.1.1-lyricwiki.patch:
main.js | 36 +++++++++++++++++++++++++++++++-----
1 file changed, 31 insertions(+), 5 deletions(-)
--- NEW FILE amarok-2.1.1-lyricwiki.patch ---
diff -up amarok-2.1.1/src/scripts/lyrics_lyricwiki/main.js.lyricwiki amarok-2.1.1/src/scripts/lyrics_lyricwiki/main.js
--- amarok-2.1.1/src/scripts/lyrics_lyricwiki/main.js.lyricwiki 2009-06-12 10:26:54.000000000 -0500
+++ amarok-2.1.1/src/scripts/lyrics_lyricwiki/main.js 2009-09-02 12:17:40.783849630 -0500
@@ -27,6 +27,31 @@ Importer.loadQtBinding( "qt.core" );
Importer.loadQtBinding( "qt.xml" );
xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><lyric artist=\"{artist}\" title=\"{title}\">{lyrics}</lyric>";
+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>(.*)<\/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( "<lyrics>", "" ).replace( "</lyrics>", "" ); // 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\//, "lyrics.wikia.com/index.php?action=edit&title=" );
+ var url2 = new QUrl(url);
+ Amarok.debug( "request-2 URL: " + url2.toString() );
+ new Downloader( url2, onFinished2 );
}
}
catch( err )
Index: amarok.spec
===================================================================
RCS file: /cvs/pkgs/rpms/amarok/F-11/amarok.spec,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -p -r1.150 -r1.151
--- amarok.spec 9 Aug 2009 00:16:03 -0000 1.150
+++ amarok.spec 2 Sep 2009 17:19:09 -0000 1.151
@@ -2,7 +2,7 @@
Name: amarok
Summary: Media player
Version: 2.1.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Group: Applications/Multimedia
License: GPLv2+
@@ -14,7 +14,7 @@ Patch50: amarok-2.0.90-qtscript_not_requ
## upstream patches
# https://bugs.kde.org/show_bug.cgi?id=202366
-Patch100: amarok-parse-lyricwiki-website.patch
+Patch100: amarok-2.1.1-lyricwiki.patch
BuildRequires: curl-devel
BuildRequires: desktop-file-utils
@@ -149,6 +149,9 @@ fi
%changelog
+* Wed Sep 02 2009 Rex Dieter <rdieter at fedoraproject.org> 2.1.1-5
+- lyricwiki patch respin (kdebug#202366)
+
* Sat Aug 08 2009 Rex Dieter <rdieter at fedoraproject.org> 2.1.1-4
- lyricwiki patch (kdebug#202366)
--- amarok-parse-lyricwiki-website.patch DELETED ---
- Previous message (by thread): rpms/cd-discid/devel .cvsignore, 1.3, 1.4 cd-discid.spec, 1.12, 1.13 sources, 1.3, 1.4
- Next message (by thread): rpms/amarok/devel amarok-2.1.80-lyricwiki.patch, NONE, 1.1 .cvsignore, 1.48, 1.49 amarok.spec, 1.160, 1.161 sources, 1.49, 1.50 amarok-parse-lyricwiki-website.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list