diff --git a/static/js/utils.js b/static/js/utils.js index 5f11ad2..9dedc20 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -42,6 +42,13 @@ NvHTTP.prototype = { _self.paired = $root.find("PairStatus").text().trim() == 1; _self.currentGame = parseInt($root.find("currentgame").text().trim(), 10); _self.serverMajorVersion = parseInt($root.find("appversion").text().trim().substring(0, 1), 10); + + // GFE 2.8 started keeping currentgame set to the last game played. As a result, it no longer + // has the semantics that its name would indicate. To contain the effects of this change as much + // as possible, we'll force the current game to zero if the server isn't in a streaming session. + if ($root.find("state").text().trim().endsWith("_SERVER_AVAILABLE")) { + _self.currentGame = 0; + } } }); },