diff options
Diffstat (limited to 'src/plugins/General/scrobbler')
| -rw-r--r-- | src/plugins/General/scrobbler/defines.h | 6 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler.cpp | 12 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler.h | 2 |
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 * |
