Cleaned
This commit is contained in:
parent
57b560d13d
commit
e5a0f3b0ab
1 changed files with 4 additions and 4 deletions
|
@ -60,6 +60,7 @@ app.controller 'BTorrentCtrl', ['$scope','$rootScope','$http','$log','$location'
|
||||||
|
|
||||||
$rootScope.seedFiles = (files) ->
|
$rootScope.seedFiles = (files) ->
|
||||||
if files? && files.length > 0
|
if files? && files.length > 0
|
||||||
|
opts = {}
|
||||||
if files.length == 1
|
if files.length == 1
|
||||||
dbg 'Seeding file ' + files[0].name
|
dbg 'Seeding file ' + files[0].name
|
||||||
else
|
else
|
||||||
|
@ -68,13 +69,12 @@ app.controller 'BTorrentCtrl', ['$scope','$rootScope','$http','$log','$location'
|
||||||
opts.name = name
|
opts.name = name
|
||||||
$rootScope.client.processing = true
|
$rootScope.client.processing = true
|
||||||
$rootScope.client.seed files, opts, $rootScope.onSeed
|
$rootScope.client.seed files, opts, $rootScope.onSeed
|
||||||
delete opts.name
|
|
||||||
|
|
||||||
$rootScope.openTorrentFile = (file) ->
|
$rootScope.openTorrentFile = (file) ->
|
||||||
if file?
|
if file?
|
||||||
dbg 'Adding torrent file ' + file.name
|
dbg 'Adding torrent file ' + file.name
|
||||||
$rootScope.client.processing = true
|
$rootScope.client.processing = true
|
||||||
$rootScope.client.add file, opts, $rootScope.onTorrent
|
$rootScope.client.add file, $rootScope.onTorrent
|
||||||
|
|
||||||
$rootScope.client.on 'error', (err, torrent) ->
|
$rootScope.client.on 'error', (err, torrent) ->
|
||||||
$rootScope.client.processing = false
|
$rootScope.client.processing = false
|
||||||
|
@ -85,7 +85,7 @@ app.controller 'BTorrentCtrl', ['$scope','$rootScope','$http','$log','$location'
|
||||||
if magnet? && magnet.length > 0
|
if magnet? && magnet.length > 0
|
||||||
dbg 'Adding magnet/hash ' + magnet
|
dbg 'Adding magnet/hash ' + magnet
|
||||||
$rootScope.client.processing = true
|
$rootScope.client.processing = true
|
||||||
$rootScope.client.add magnet, opts, onTorrent || $rootScope.onTorrent
|
$rootScope.client.add magnet, onTorrent || $rootScope.onTorrent
|
||||||
|
|
||||||
$rootScope.destroyedTorrent = (err) ->
|
$rootScope.destroyedTorrent = (err) ->
|
||||||
if err
|
if err
|
||||||
|
@ -214,7 +214,7 @@ app.controller 'ViewCtrl', ['$scope','$rootScope','$http','$log','$location', 'n
|
||||||
duration: 2000
|
duration: 2000
|
||||||
html: true
|
html: true
|
||||||
|
|
||||||
onTorrent = (torrent, isSeed) ->
|
onTorrent = (torrent) ->
|
||||||
$rootScope.viewerStyle = {'margin-top': '-20px', 'text-align': 'center'}
|
$rootScope.viewerStyle = {'margin-top': '-20px', 'text-align': 'center'}
|
||||||
dbg torrent.magnetURI
|
dbg torrent.magnetURI
|
||||||
torrent.safeTorrentFileURL = torrent.torrentFileBlobURL
|
torrent.safeTorrentFileURL = torrent.torrentFileBlobURL
|
||||||
|
|
Loading…
Reference in a new issue