Skip to content

Commit

Permalink
Merge branch 'release/0.1.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco committed Feb 6, 2016
2 parents abe3396 + 4e7634e commit 9533514
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ deploy:
api_key:
secure: FoiDMNJi5TpJEN1lcxaQ4o8P+p3KRv5W41A1Z7mvxmREsgEgZNzHGsEKssBJdchZOexFtQmQW5/KQBr2StgcYYThfyDs5et0G1xVUitRp5/WtJ40LZmvsA895aYOI5ZpyIeGKG1Xaa059kC5bAqgZNyhOaVRT+ulsNroYcgEM6qNU54D7K6bAy5WQKqIqVU6V8FdQxTp+6XHrvJBayY2vBROzSUch02dsI5+2PpWG+RHH6lT/WnDlmtaQwBO1UTNHn+WfJELbXcovY8SkmBuIjNnqkmAWhgcrOMJ1NGELV4L10kNyisx14M+kEsagIg7Le4qDp0nYuz1yKu8qjTfUdF4SCSvSDaCTTcC9IDRgCxpX9FrIgesDbzENQKggzXs/KHUgp1RBvuFQAOTrBX8/ThZ12pLnxDaVnfRgi1xjJzwKOHthu8ZorrcK9KVRZBdSsHqqrLJ6TUa+bjDUJQZn1NHkxFigpv718ki8ynL31qOxeeCjU6anJx+tGxVUWdfHR1SVvGrtaQ3ekXVV1IOVqAkLc8MdueLvZvDOwxniN/rW/HZQdbKEE+VZLT0vA8AJWs00tuJb/S0EJtFJ5lclNCsKToJmUKE3PW6I6EDH8ym4wzOorVBr4yW8Q3BUb5OJQipXs+V5ZfDdmf74INYpEKp9Lu1qA3T/YwmpJfnRFQ=
file:
- "release/v0.35.2/aof-replay-client-0.1.8-darwin-x64.zip"
- "release/v0.35.2/aof-replay-client-0.1.8-win32-ia32.zip"
- "release/v0.35.2/aof-replay-client-0.1.8-win32-x64.zip"
- "release/v0.35.2/aof-replay-client-0.1.9-darwin-x64.zip"
- "release/v0.35.2/aof-replay-client-0.1.9-win32-ia32.zip"
- "release/v0.35.2/aof-replay-client-0.1.9-win32-x64.zip"
on:
tags: true
all_branches: true
Expand Down
8 changes: 6 additions & 2 deletions src/app/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ app.controller('MainController', ['$scope', '$rootScope', '$mdDialog',
}
};

$scope.ddragonBase = "http://ddragon.leagueoflegends.com/cdn/5.23.1/img/";
$scope.ddragonBase = "http://ddragon.leagueoflegends.com/cdn/";
$scope.ddragonVersion = "6.2.1/";
$scope.loading = true;
$scope.msg = "Loading...";
$scope.replay = null;
Expand Down Expand Up @@ -119,8 +120,11 @@ app.controller('MainController', ['$scope', '$rootScope', '$mdDialog',
});
});

ipc.on("staticData", function(event, obj) {
$scope.ddragonVersion = obj.version;
});

ipc.on("clientInfo", function(event, obj) {
console.log(obj);
$scope.$apply(function() {
$scope.lolClientFound = obj.found;
$scope.lolClientVersion = obj.version;
Expand Down
20 changes: 14 additions & 6 deletions src/app/tpl/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@
<tr ng-repeat="player in replay.players | filter: { 'teamNr': 0 }">
<td>{{ player.summonerName }}</td>
<td style="text-align: center;">
<img style="float: left; margin-right: 2px; margin-left: 2px;" ng-src="{{ddragonBase}}champion/{{player.champion.image}}" width="48" height="48" />
<img style="float: left; margin-right: 2px; margin-left: 2px;" ng-src="{{ddragonBase}}{{ddragonVersion}}img/champion/{{player.champion.image}}" width="48" height="48" />
<div style="float: left;">
<div class="spell1"><img ng-src="{{ddragonBase}}spell/{{player.d.image}}" width="23" height="23"></div>
<div class="spell2"><img ng-src="{{ddragonBase}}spell/{{player.f.image}}" width="23" height="23"></div>
<div class="spell1">
<img ng-src="{{ddragonBase}}{{ddragonVersion}}img/spell/{{player.d.image}}" width="23" height="23">
</div>
<div class="spell2">
<img ng-src="{{ddragonBase}}{{ddragonVersion}}img/spell/{{player.f.image}}" width="23" height="23">
</div>
</div>
</td>
<td style="text-align: center;">
Expand All @@ -64,10 +68,14 @@
</md-tooltip>
</td>
<td style="text-align: center;">
<img style="float: right; margin-right: 2px; margin-left: 2px;" ng-src="{{ddragonBase}}champion/{{player.champion.image}}" width="48" height="48" />
<img style="float: right; margin-right: 2px; margin-left: 2px;" ng-src="{{ddragonBase}}{{ddragonVersion}}img/champion/{{player.champion.image}}" width="48" height="48" />
<div style="float: right;">
<div class="spell1"><img ng-src="{{ddragonBase}}spell/{{player.d.image}}" width="23" height="23"></div>
<div class="spell2"><img ng-src="{{ddragonBase}}spell/{{player.f.image}}" width="23" height="23"></div>
<div class="spell1">
<img ng-src="{{ddragonBase}}{{ddragonVersion}}img/spell/{{player.d.image}}" width="23" height="23">
</div>
<div class="spell2">
<img ng-src="{{ddragonBase}}{{ddragonVersion}}img/spell/{{player.f.image}}" width="23" height="23">
</div>
</div>
<td style="text-align: right;">{{ player.summonerName }}</td>
</tr>
Expand Down
11 changes: 8 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ let _ = require("underscore");
let fs = require("fs");
let winston = require("winston");

let ddragonBase = "http://ddragon.leagueoflegends.com/cdn/5.23.1/";
let ddragonBase = "http://ddragon.leagueoflegends.com/cdn/";
let ddragonVersion = "6.2.1/";
let replay = null;
let mainWindow = null;
let settings = {};
Expand Down Expand Up @@ -140,8 +141,10 @@ function getStaticData(callback) {
staticData.leagues = body.leagues;
fs.writeFileSync(app.getPath("userCache") + "/static", JSON.stringify(staticData));

ddragonVersion = body.newestVersion.riotVersion + "/";

logger.info("Getting champion info");
request({ url: ddragonBase + "data/en_US/champion.json", json: true, timeout: 10000 }, function(err, response, body) {
request({ url: ddragonBase + ddragonVersion + "data/en_US/champion.json", json: true, timeout: 10000 }, function(err, response, body) {
if (!err && response && response.statusCode == 200) {
staticData.champions = body.data;
} else {
Expand All @@ -150,7 +153,7 @@ function getStaticData(callback) {
});

logger.info("Getting summoner spell info");
request({ url: ddragonBase + "data/en_US/summoner.json", json: true, timeout: 10000 }, function(err, response, body) {
request({ url: ddragonBase + ddragonVersion + "data/en_US/summoner.json", json: true, timeout: 10000 }, function(err, response, body) {
if (!err && response && response.statusCode == 200) {
staticData.summonerSpells = body.data;
} else {
Expand Down Expand Up @@ -207,6 +210,8 @@ ipc.on("ready", function(event, args) {
mainWindow.webContents.send("loading", { loading: true, msg: "Retreiving static data..." });
getStaticData(function() {

mainWindow.webContents.send("staticData", { version: ddragonVersion });

mainWindow.webContents.send("loading", { loading: true, msg: "Searching for league client..." });
lolClient.find(settings.lolClientPath, function(found) {

Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aof-replay-client",
"version": "0.1.8",
"version": "0.1.9",
"main": "./index.js",
"scripts": {
"start": "cd .. && npm start",
Expand Down

0 comments on commit 9533514

Please sign in to comment.