1 |
angelos 12/07/02 15:32:34 |
2 |
|
3 |
Added: qmpdclient-1.2.2-qt48.patch |
4 |
Log: |
5 |
Apply patch for Qt-4.8 (bug #418937 by Kent Fredric) |
6 |
|
7 |
(Portage version: 2.2.0_alpha114/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-sound/qmpdclient/files/qmpdclient-1.2.2-qt48.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/qmpdclient/files/qmpdclient-1.2.2-qt48.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/qmpdclient/files/qmpdclient-1.2.2-qt48.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: qmpdclient-1.2.2-qt48.patch |
16 |
=================================================================== |
17 |
From 20edef54b109882632f58549d181123b9985d65b Mon Sep 17 00:00:00 2001 |
18 |
From: Kent Fredric <kentfredric@×××××.com> |
19 |
Date: Fri, 1 Jun 2012 21:54:10 +1200 |
20 |
Subject: [PATCH] First attempt at fixing lastfm scrobbling |
21 |
|
22 |
--- |
23 |
src/lastfmsubmitter.cpp | 10 ++++++++-- |
24 |
1 file changed, 8 insertions(+), 2 deletions(-) |
25 |
|
26 |
diff --git a/src/lastfmsubmitter.cpp b/src/lastfmsubmitter.cpp |
27 |
index cff94bc..a9b6ea9 100644 |
28 |
--- a/src/lastfmsubmitter.cpp |
29 |
+++ b/src/lastfmsubmitter.cpp |
30 |
@@ -112,7 +112,10 @@ void LastFmSubmitter::scrobbleNp(MPDSong & s) { |
31 |
data += QString("l=%1&").arg(s.secs() >0 ? QString::number(s.secs()) : "100"); |
32 |
data += QString("n=%1").arg(QString(QUrl::toPercentEncoding(s.track()))); |
33 |
//qDebug() << data; |
34 |
- m_netAccess->post(QNetworkRequest(QUrl(m_npUrl)), data.toAscii()); |
35 |
+ QUrl url(m_npUrl); |
36 |
+ QNetworkRequest request(url); |
37 |
+ request.setRawHeader("Content-Type", "application/x-www-form-urlencoded"); |
38 |
+ m_netAccess->post(request, data.toAscii()); |
39 |
} |
40 |
|
41 |
void LastFmSubmitter::scrobbleCurrent() { |
42 |
@@ -152,7 +155,10 @@ void LastFmSubmitter::scrobbleQueued() { |
43 |
if (i>0) { |
44 |
//qDebug() << "sending scrobble to " << m_subUrl.toAscii(); |
45 |
//qDebug() << "data: " << data.toAscii(); |
46 |
- m_netAccess->post(QNetworkRequest(QUrl(m_subUrl)), data.toAscii()); |
47 |
+ QUrl url(m_subUrl); |
48 |
+ QNetworkRequest request(url); |
49 |
+ request.setRawHeader("Content-Type", "application/x-www-form-urlencoded"); |
50 |
+ m_netAccess->post(request, data.toAscii()); |
51 |
m_awaitingScrob = true; |
52 |
} |
53 |
} |
54 |
-- |
55 |
1.7.9.4 |