mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-02-16 02:30:52 +00:00
Implement fetching box art
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <QTimer>
|
||||
#include <QXmlStreamReader>
|
||||
#include <QSslKey>
|
||||
#include <QImageReader>
|
||||
|
||||
#define REQUEST_TIMEOUT_MS 5000
|
||||
|
||||
@@ -244,6 +245,20 @@ NvHTTP::verifyResponseStatus(QString xml)
|
||||
}
|
||||
}
|
||||
|
||||
QImage
|
||||
NvHTTP::getBoxArt(int appId)
|
||||
{
|
||||
QNetworkReply* reply = openConnection(m_BaseUrlHttps,
|
||||
"appasset",
|
||||
"appid="+QString::number(appId)+
|
||||
"&AssetType=2&AssetIdx=0",
|
||||
true);
|
||||
QImage image = QImageReader(reply).read();
|
||||
delete reply;
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
QByteArray
|
||||
NvHTTP::getXmlStringFromHex(QString xml,
|
||||
QString tagName)
|
||||
|
||||
@@ -107,6 +107,9 @@ public:
|
||||
QVector<NvApp>
|
||||
getAppList();
|
||||
|
||||
QImage
|
||||
getBoxArt(int appId);
|
||||
|
||||
QUrl m_BaseUrlHttp;
|
||||
QUrl m_BaseUrlHttps;
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user