mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
Merge branch 'master' of github.com:cgutman/moonlight-chrome
This commit is contained in:
commit
c308e4034c
@ -229,7 +229,7 @@ NvHTTP.prototype = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getAppList: function () {
|
getAppListWithCacheFlush: function () {
|
||||||
return sendMessage('openUrl', [this._baseUrlHttps + '/applist?' + this._buildUidStr(), false]).then(function (ret) {
|
return sendMessage('openUrl', [this._baseUrlHttps + '/applist?' + this._buildUidStr(), false]).then(function (ret) {
|
||||||
$xml = this._parseXML(ret);
|
$xml = this._parseXML(ret);
|
||||||
|
|
||||||
@ -244,10 +244,24 @@ NvHTTP.prototype = {
|
|||||||
running: (appElements[i].getElementsByTagName("IsRunning")[0].innerHTML.trim() == 1)
|
running: (appElements[i].getElementsByTagName("IsRunning")[0].innerHTML.trim() == 1)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._memCachedApplist = appList;
|
||||||
|
|
||||||
return appList;
|
return appList;
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getAppList: function () {
|
||||||
|
if (this._memCachedApplist) {
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
console.log('returning memory cached app list');
|
||||||
|
resolve(this._memCachedApplist);
|
||||||
|
return;
|
||||||
|
}.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.getAppListWithCacheFlush();
|
||||||
|
},
|
||||||
|
|
||||||
// returns the box art of the given appID.
|
// returns the box art of the given appID.
|
||||||
// three layers of response time are possible: memory cached (in javascript), storage cached (in chrome.storage.local), and streamed (host sends binary over the network)
|
// three layers of response time are possible: memory cached (in javascript), storage cached (in chrome.storage.local), and streamed (host sends binary over the network)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user