v0.8.0 - Client over speeds and ratio, fix errors, using webtorrent 0.64.4 while npm build is published

This commit is contained in:
Diego Rodríguez 2015-12-08 23:58:09 -05:00
parent 3fc5e3dfa7
commit 1d9c566134
4 changed files with 43 additions and 17 deletions

View file

@ -131,21 +131,24 @@ app.controller 'bTorrentCtrl', ['$scope','$http','$log','$location', 'ngNotify',
return return
$scope.onTorrent = (torrent, isSeed) -> $scope.onTorrent = (torrent, isSeed) ->
$scope.client.validTorrents.push torrent
torrent.safeTorrentFileURL = torrent.torrentFileURL torrent.safeTorrentFileURL = torrent.torrentFileURL
torrent.fileName = torrent.name + '.torrent' torrent.fileName = torrent.name + '.torrent'
if !isSeed if !isSeed
$scope.client.processing = false $scope.client.validTorrents.push torrent
if !($scope.selectedTorrent?) || isSeed if !($scope.selectedTorrent?)
$scope.selectedTorrent = torrent $scope.selectedTorrent = torrent
$scope.client.processing = false
torrent.files.forEach (file) -> torrent.files.forEach (file) ->
file.getBlobURL (err, url) -> file.getBlobURL (err, url) ->
if err if err
throw err throw err
if isSeed if isSeed
dbg 'Started seeding', torrent dbg 'Started seeding', torrent
$scope.client.validTorrents.push torrent
if !($scope.selectedTorrent?)
$scope.selectedTorrent = torrent
$scope.client.processing = false $scope.client.processing = false
file.url = url file.url = url
if !isSeed if !isSeed

View file

@ -8,8 +8,9 @@ html(ng-app='bTorrent', lang='en')
meta(name='keywords', content='βTorrent, btorrent, client, webtorrent, browser, torrent, stream, bittorrent') meta(name='keywords', content='βTorrent, btorrent, client, webtorrent, browser, torrent, stream, bittorrent')
meta(name='author', content='Diego Rodríguez Baquero - DiegoRBaquero') meta(name='author', content='Diego Rodríguez Baquero - DiegoRBaquero')
meta(name='viewport', content='width=device-width, initial-scale=1') meta(name='viewport', content='width=device-width, initial-scale=1')
script(src='https://cdn.jsdelivr.net/g/webtorrent@0.63.3,momentjs@2.10,angularjs@1.4,angular.ui-grid@3.0,angular.ng-notify@0.7') //webtorrent@0.63.3,
script(src='https://cdnjs.cloudflare.com/ajax/libs/danialfarid-angular-file-upload/10.1.8/ng-file-upload.min.js') script(src='webtorrent.min.js') //WebTorrent 0.63.4
script(src='https://cdn.jsdelivr.net/g/momentjs@2.10,angularjs@1.4,angular.ui-grid@3.0,angular.ng-notify@0.7,angular.file-upload@10.1')
link(rel='stylesheet', href='https://cdn.jsdelivr.net/g/normalize@3.0,skeleton@2.0,angular.ng-notify@0.7(ng-notify.min.css)') link(rel='stylesheet', href='https://cdn.jsdelivr.net/g/normalize@3.0,skeleton@2.0,angular.ng-notify@0.7(ng-notify.min.css)')
link(rel='stylesheet', href='https://cdn.jsdelivr.net/fontawesome/4.5/css/font-awesome.min.css') link(rel='stylesheet', href='https://cdn.jsdelivr.net/fontawesome/4.5/css/font-awesome.min.css')
link(rel='stylesheet', href='https://cdn.jsdelivr.net/angular.ui-grid/3.0.7/ui-grid.min.css') link(rel='stylesheet', href='https://cdn.jsdelivr.net/angular.ui-grid/3.0.7/ui-grid.min.css')
@ -18,7 +19,7 @@ html(ng-app='bTorrent', lang='en')
header header
h1 h1
| βTorrent | βTorrent
span.version v0.7.1 span.version v0.8.0
.container .container
.row .row
@ -64,10 +65,16 @@ html(ng-app='bTorrent', lang='en')
td(ng-show='file.done') td(ng-show='file.done')
a(ng-href='{{file.url}}', download='{{file.name}}', target='_self', ng-show='file.done') {{file.name}} a(ng-href='{{file.url}}', download='{{file.name}}', target='_self', ng-show='file.done') {{file.name}}
td {{file.length | pbytes}} td {{file.length | pbytes}}
hr .center
strong Client Stats:
| ↓ {{client.downloadSpeed() | pbytes}}/s ·
| ↑ {{client.uploadSpeed() | pbytes}}/s ·
| Ratio: {{client.ratio | number:2}}
footer footer
a.button(href="https://github.com/DiegoRBaquero/BTorrent/issues", target="_blank") Suggest a new feature / Report a bug a.button(href="https://github.com/DiegoRBaquero/BTorrent/issues", target="_blank")
i.fa.comment i.fa.fa-github.fa-5
| Suggest a feature / Report a bug
i.fa.fa-comment
br br
| An Open-Source project by | An Open-Source project by
a(href='http://diegorbaquero.com') DiegoRBaquero a(href='http://diegorbaquero.com') DiegoRBaquero
@ -76,5 +83,5 @@ html(ng-app='bTorrent', lang='en')
a(href='https://webtorrent.io') WebTorrent a(href='https://webtorrent.io') WebTorrent
p p
.spinner(ng-show="client.processing") .spinner(ng-show="client.processing")
i.fa.fa-spinner.fa-6.fa-spin.spinner-icon i.fa.fa-spinner.fa-spin.spinner-icon
script(src='app.js') script(src='app.js')

View file

@ -11,13 +11,12 @@ th, td
overflow: auto overflow: auto
white-space: nowrap white-space: nowrap
hr
margin-top: 20px
margin-bottom: 10px
h2, h3, h4, h5, h6, ul, li h2, h3, h4, h5, h6, ul, li
margin-bottom: 0 margin-bottom: 0
footer
margin-top: 10px
.container .container
width: 95% width: 95%
max-width: 95% max-width: 95%
@ -45,6 +44,7 @@ h2, h3, h4, h5, h6, ul, li
border-radius: 25px border-radius: 25px
opacity: .8 opacity: .8
text-align: center text-align: center
.spinner-icon .spinner-icon
position: relative position: relative
top: 50% top: 50%

16
webtorrent.min.js vendored Normal file

File diff suppressed because one or more lines are too long