Skip to content

Commit

Permalink
get torrent size from info.length when only one file in torrent files…
Browse files Browse the repository at this point in the history
… list
  • Loading branch information
taobataoma committed Apr 18, 2017
1 parent bbaf40d commit a7f428b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/torrents/client/controllers/uploads.client.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,13 @@

//console.log(vm.torrentInfo);

angular.forEach(vm.torrentInfo.info.files, function (item) {
l = l + item.length;
});
if (vm.torrentInfo.length !== undefined) {
l = vm.torrentInfo.length;
} else {
angular.forEach(vm.torrentInfo.info.files, function (item) {
l = l + item.length;
});
}

var t = [];
angular.forEach(vm.resourcesTags.movie.radio, function (item) {
Expand Down

0 comments on commit a7f428b

Please sign in to comment.