Fix minor code issues in tidal

This commit is contained in:
Jonas Kvinge
2019-06-18 23:39:16 +02:00
parent dabd6f8284
commit dbd2edf442
7 changed files with 26 additions and 24 deletions

View File

@@ -132,11 +132,9 @@ void TidalFavoriteRequest::AddFavorites(const FavoriteType type, const SongList
ParamList params = ParamList() << Param("countryCode", country_code())
<< Param(text, ids);
QStringList query_items;
QUrlQuery url_query;
for (const Param& param : params) {
EncodedParam encoded_param(QUrl::toPercentEncoding(param.first), QUrl::toPercentEncoding(param.second));
query_items << QString(encoded_param.first + "=" + encoded_param.second);
url_query.addQueryItem(encoded_param.first, encoded_param.second);
}
@@ -236,11 +234,9 @@ void TidalFavoriteRequest::RemoveFavorites(const FavoriteType type, const int id
ParamList params = ParamList() << Param("countryCode", country_code());
QStringList query_items;
QUrlQuery url_query;
for (const Param& param : params) {
EncodedParam encoded_param(QUrl::toPercentEncoding(param.first), QUrl::toPercentEncoding(param.second));
query_items << QString(encoded_param.first + "=" + encoded_param.second);
url_query.addQueryItem(encoded_param.first, encoded_param.second);
}