Skip to content

Commit

Permalink
Fix version for observer mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Divi committed Dec 8, 2014
1 parent d1f1cb9 commit 5a37ab3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/EloGank/Replay/Downloader/Client/ReplayClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ public function downloadKeyframe($region, $gameId, $keyframeId)
* @param string $region
* @param int $gameId
*
* @return mixed
*
* @deprecated
* @return string
*/
public function downloadEndStats($region, $gameId)
{
Expand All @@ -184,6 +182,8 @@ public function downloadEndStats($region, $gameId)
return false;
}

// base64_decode to decode endStats file

return $endStats->getContent();
}

Expand All @@ -192,7 +192,13 @@ public function downloadEndStats($region, $gameId)
*/
public function getObserverVersion()
{
$version = $this->buzz->get($this->getUrl('EUW1') . self::URL_VERSION);
// version seems to be the same for all servers
try {
$version = $this->buzz->get($this->getUrl('EUW1') . self::URL_VERSION);
}
catch (TimeoutException $e) {
return false;
}

return $version->getContent();
}
Expand Down

0 comments on commit 5a37ab3

Please sign in to comment.