change file name

This commit is contained in:
MaysWind 2016-06-01 22:05:36 +08:00
parent 2004ec6c9b
commit 1db9e2d352
5 changed files with 14 additions and 14 deletions

View file

@ -284,7 +284,7 @@
<script src="scripts/filters/volumn.js"></script>
<script src="scripts/services/ariaNgCommonService.js"></script>
<script src="scripts/services/ariaNgSettingService.js"></script>
<script src="scripts/services/ariaNgTaskService.js"></script>
<script src="scripts/services/aria2TaskService.js"></script>
<script src="scripts/services/aria2SettingService.js"></script>
<script src="scripts/services/aria2RpcService.js"></script>
<script src="scripts/services/aria2HttpRpcService.js"></script>

View file

@ -1,7 +1,7 @@
(function () {
'use strict';
angular.module('ariaNg').controller('DownloadListController', ['$rootScope', '$scope', '$window', '$location', '$route', '$interval', 'dragulaService', 'ariaNgCommonService', 'ariaNgSettingService', 'ariaNgTaskService', function ($rootScope, $scope, $window, $location, $route, $interval, dragulaService, ariaNgCommonService, ariaNgSettingService, ariaNgTaskService) {
angular.module('ariaNg').controller('DownloadListController', ['$rootScope', '$scope', '$window', '$location', '$route', '$interval', 'dragulaService', 'ariaNgCommonService', 'ariaNgSettingService', 'aria2TaskService', function ($rootScope, $scope, $window, $location, $route, $interval, dragulaService, ariaNgCommonService, ariaNgSettingService, aria2TaskService) {
var location = $location.path().substring(1);
var downloadTaskRefreshPromise = null;
var pauseDownloadTaskRefresh = false;
@ -12,7 +12,7 @@
return;
}
return ariaNgTaskService.getTaskList(location, needRequestWholeInfo, function (result) {
return aria2TaskService.getTaskList(location, needRequestWholeInfo, function (result) {
if (!ariaNgCommonService.extendArray(result, $rootScope.taskContext.list, 'gid')) {
if (needRequestWholeInfo) {
$rootScope.taskContext.list = result;
@ -25,7 +25,7 @@
}
if ($rootScope.taskContext.list) {
ariaNgTaskService.processDownloadTasks($rootScope.taskContext.list);
aria2TaskService.processDownloadTasks($rootScope.taskContext.list);
$rootScope.taskContext.enableSelectAll = $rootScope.taskContext.list.length > 1;
}
});
@ -73,7 +73,7 @@
pauseDownloadTaskRefresh = true;
ariaNgTaskService.changeTaskPosition(gid, index, function (result) {
aria2TaskService.changeTaskPosition(gid, index, function (result) {
pauseDownloadTaskRefresh = false;
});
});

View file

@ -1,7 +1,7 @@
(function () {
'use strict';
angular.module('ariaNg').controller('MainController', ['$rootScope', '$scope', '$route', '$interval', 'aria2SettingService', 'ariaNgCommonService', 'ariaNgTaskService', 'ariaNgSettingService', function ($rootScope, $scope, $route, $interval, aria2SettingService, ariaNgCommonService, ariaNgTaskService, ariaNgSettingService) {
angular.module('ariaNg').controller('MainController', ['$rootScope', '$scope', '$route', '$interval', 'ariaNgCommonService', 'ariaNgSettingService', 'aria2TaskService', 'aria2SettingService', function ($rootScope, $scope, $route, $interval, ariaNgCommonService, ariaNgSettingService, aria2TaskService, aria2SettingService) {
var globalStatRefreshPromise = null;
var refreshGlobalStat = function () {
@ -40,9 +40,9 @@
var invoke = null;
if (state == 'start') {
invoke = ariaNgTaskService.startTasks;
invoke = aria2TaskService.startTasks;
} else if (state == 'pause') {
invoke = ariaNgTaskService.pauseTasks;
invoke = aria2TaskService.pauseTasks;
} else {
return;
}

View file

@ -1,7 +1,7 @@
(function () {
'use strict';
angular.module('ariaNg').controller('TaskDetailController', ['$rootScope', '$scope', '$routeParams', '$interval', 'ariaNgCommonService', 'ariaNgSettingService', 'ariaNgTaskService', function ($rootScope, $scope, $routeParams, $interval, ariaNgCommonService, ariaNgSettingService, ariaNgTaskService) {
angular.module('ariaNg').controller('TaskDetailController', ['$rootScope', '$scope', '$routeParams', '$interval', 'ariaNgCommonService', 'ariaNgSettingService', 'aria2TaskService', function ($rootScope, $scope, $routeParams, $interval, ariaNgCommonService, ariaNgSettingService, aria2TaskService) {
var tabOrders = ['overview', 'blocks', 'filelist', 'btpeers'];
var downloadTaskRefreshPromise = null;
@ -12,17 +12,17 @@
$scope.healthPercent = 0;
var refreshBtPeers = function (task) {
return ariaNgTaskService.getBtTaskPeers(task.gid, function (result) {
return aria2TaskService.getBtTaskPeers(task.gid, function (result) {
if (!ariaNgCommonService.extendArray(result, $scope.peers, 'peerId')) {
$scope.peers = result;
}
$scope.healthPercent = ariaNgTaskService.estimateHealthPercentFromPeers(task, $scope.peers);
$scope.healthPercent = aria2TaskService.estimateHealthPercentFromPeers(task, $scope.peers);
});
};
var refreshDownloadTask = function () {
return ariaNgTaskService.getTaskStatus($routeParams.gid, function (result) {
return aria2TaskService.getTaskStatus($routeParams.gid, function (result) {
if (result.status == 'active' && result.bittorrent) {
refreshBtPeers(result);
} else {
@ -62,7 +62,7 @@
};
$scope.loadTaskOption = function (task) {
$rootScope.loadPromise = ariaNgTaskService.getTaskOption(task.gid, function (result) {
$rootScope.loadPromise = aria2TaskService.getTaskOption(task.gid, function (result) {
$scope.options = result;
});
};

View file

@ -1,7 +1,7 @@
(function () {
'use strict';
angular.module('ariaNg').factory('ariaNgTaskService', ['$translate', 'aria2RpcService', function ($translate, aria2RpcService) {
angular.module('ariaNg').factory('aria2TaskService', ['$translate', 'aria2RpcService', function ($translate, aria2RpcService) {
var getFileNameFromPath = function (path) {
if (!path) {
return path;