aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-05-27 16:04:59 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-05-27 16:04:59 +0000
commit55753bcabe762990c3ce3e31199db4d8581c3e2b (patch)
tree9b7f93431e0e98c2f5b53eb814d1dba1c44b2d2a /src/plugins/General
parent49651e636dcbee7fc6e9c410167f640cd52e3e35 (diff)
downloadqmmp-55753bcabe762990c3ce3e31199db4d8581c3e2b.tar.gz
qmmp-55753bcabe762990c3ce3e31199db4d8581c3e2b.tar.bz2
qmmp-55753bcabe762990c3ce3e31199db4d8581c3e2b.zip
scrobbler: fixed libre.fm support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@5034 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General')
-rw-r--r--src/plugins/General/scrobbler/defines.h6
-rw-r--r--src/plugins/General/scrobbler/scrobbler.cpp12
-rw-r--r--src/plugins/General/scrobbler/scrobbler.h2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/General/scrobbler/defines.h b/src/plugins/General/scrobbler/defines.h
index 36648fe4f..595c44541 100644
--- a/src/plugins/General/scrobbler/defines.h
+++ b/src/plugins/General/scrobbler/defines.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2013 by Ilya Kotov *
+ * Copyright (C) 2013-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -22,9 +22,9 @@
#define DEFINES_H
#define SCROBBLER_LASTFM_URL "http://ws.audioscrobbler.com/2.0/"
-#define SCROBBLER_LIBREFM_URL "http://libre.fm/2.0/"
+#define SCROBBLER_LIBREFM_URL "https://libre.fm/2.0/"
#define LASTFM_AUTH_URL "http://www.last.fm/api/auth/"
-#define LIBREFM_AUTH_URL "http://libre.fm/api/auth/"
+#define LIBREFM_AUTH_URL "https://libre.fm/api/auth/"
#endif // DEFINES_H
diff --git a/src/plugins/General/scrobbler/scrobbler.cpp b/src/plugins/General/scrobbler/scrobbler.cpp
index 526912593..065c55f38 100644
--- a/src/plugins/General/scrobbler/scrobbler.cpp
+++ b/src/plugins/General/scrobbler/scrobbler.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010-2013 by Ilya Kotov *
+ * Copyright (C) 2010-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -309,7 +309,7 @@ void Scrobbler::submit()
}
QUrl url(m_scrobblerUrl);
- url.setPort(80);
+ url.setPort(m_scrobblerUrl.startsWith("https") ? 443 : 80);
QUrl body("");
QByteArray data;
@@ -357,7 +357,7 @@ void Scrobbler::sendNotification(const SongInfo &info)
}
QUrl url(m_scrobblerUrl);
- url.setPort(80);
+ url.setPort(m_scrobblerUrl.startsWith("https") ? 443 : 80);
QUrl body("");
QByteArray data;
@@ -412,7 +412,7 @@ void ScrobblerAuth::getToken()
qDebug("ScrobblerAuth[%s]: new token request", qPrintable(m_name));
m_session.clear();
QUrl url(m_scrobblerUrl + "?");
- url.setPort(80);
+ url.setPort(m_scrobblerUrl.startsWith("https") ? 443 : 80);
url.addQueryItem("method", "auth.getToken");
url.addQueryItem("api_key", API_KEY);
@@ -433,7 +433,7 @@ void ScrobblerAuth::getSession()
{
qDebug("ScrobblerAuth[%s]: new session request", qPrintable(m_name));
QUrl url(m_scrobblerUrl + "?");
- url.setPort(80);
+ url.setPort(m_scrobblerUrl.startsWith("https") ? 443 : 80);
url.addQueryItem("api_key", API_KEY);
url.addQueryItem("method", "auth.getSession");
url.addQueryItem("token", m_token);
@@ -463,7 +463,7 @@ void ScrobblerAuth::checkSession(const QString &session)
params.insert("limit", "1");
QUrl url(m_scrobblerUrl);
- url.setPort(80);
+ url.setPort(m_scrobblerUrl.startsWith("https") ? 443 : 80);
QUrl body("");
QByteArray data;
diff --git a/src/plugins/General/scrobbler/scrobbler.h b/src/plugins/General/scrobbler/scrobbler.h
index db0e086ad..41a69c53c 100644
--- a/src/plugins/General/scrobbler/scrobbler.h
+++ b/src/plugins/General/scrobbler/scrobbler.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010-2013 by Ilya Kotov *
+ * Copyright (C) 2010-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *