Skip to content

Commit

Permalink
fix: 修复匿名登录下,部分接口提示网络太拥挤问题
Browse files Browse the repository at this point in the history
  • Loading branch information
overwriter committed Jan 21, 2024
1 parent eb1966e commit e71c7ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion QCloudMusicApi/util/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Config {

const static QString anonymous_token = QStringLiteral("de91e1f8119d32e01cc73efcb82c0a30c9137e8d4f88dbf5e3d7bf3f28998f21add2bc8204eeee5e56c0bbb8743574b46ca2c10c35dc172199bef9bf4d60ecdeab066bb4dc737d1c3324751bcc9aaf44c3061cd18d77b7a0");
static QString anonymous_token = QStringLiteral("de91e1f8119d32e01cc73efcb82c0a30c9137e8d4f88dbf5e3d7bf3f28998f21add2bc8204eeee5e56c0bbb8743574b46ca2c10c35dc172199bef9bf4d60ecdeab066bb4dc737d1c3324751bcc9aaf44c3061cd18d77b7a0");
const static QMap<QString, QString> resourceTypeMap {
{ "0", "R_SO_4_" },
{ "1", "R_MV_5_" },
Expand Down
2 changes: 2 additions & 0 deletions QCloudMusicApi/util/request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ QVariantMap createRequest(QNetworkAccessManager::Operation method,
if(!cookie.contains("MUSIC_A")) {
//options.cookie.MUSIC_A = config.anonymous_token
cookie["MUSIC_A"] = Config::anonymous_token;
cookie["os"] = cookie.value("os", "ios");
cookie["appver"] = cookie.value("appver", "8.10.90");
}
}
request.setHeader(QNetworkRequest::CookieHeader, QVariant::fromValue(Index::mapToCookie(cookie)));
Expand Down

0 comments on commit e71c7ac

Please sign in to comment.