Add back the capability to get box art with NvHTTP

This commit is contained in:
Cameron Gutman 2015-02-27 01:15:21 -05:00
parent 8fb2622b66
commit a4ec619e5a

View File

@ -401,6 +401,12 @@ public class NvHTTP {
public void unpair() throws IOException {
openHttpConnectionToString(baseUrl + "/unpair?uniqueid=" + uniqueId, true);
}
public InputStream getBoxArt(NvApp app) throws IOException {
ResponseBody resp = openHttpConnection(baseUrl + "/appasset?uniqueid=" + uniqueId +
"&appid=" + app.getAppId() + "&AssetType=2&AssetIdx=0", true);
return resp.byteStream();
}
final private static char[] hexArray = "0123456789ABCDEF".toCharArray();
private static String bytesToHex(byte[] bytes) {