public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Rex Dieter <rdieter@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/amarok] epel10.2: - lyricwiki patch (kdebug#202366)
Date: Mon, 06 Jul 2026 18:30:52 GMT [thread overview]
Message-ID: <178336265252.1.5946463723555032429.rpms-amarok-1b2a59e5ebe7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/amarok
Branch : epel10.2
Commit : 1b2a59e5ebe7efddd61fc067ed621d4c8728e441
Author : Rex Dieter <rdieter@fedoraproject.org>
Date : 2009-08-09T00:11:46+00:00
Stats : +64/-6 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/amarok/c/1b2a59e5ebe7efddd61fc067ed621d4c8728e441?branch=epel10.2
Log:
- lyricwiki patch (kdebug#202366)
---
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 = "<?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\//, "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 <rdieter@fedoraproject.org> 2.1.1-4
+- lyricwiki patch (kdebug#202366)
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
reply other threads:[~2026-07-06 18:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178336265252.1.5946463723555032429.rpms-amarok-1b2a59e5ebe7@fedoraproject.org \
--to=rdieter@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox