     html: true
 
   $scope.addMagnet = ->
-    $rootScope.addMagnet($scope.torrentInput)
+    $rootScope.addMagnet $scope.torrentInput
     $scope.torrentInput = ''
     
   $scope.columns = [


  $rootScope.seedFiles = (files) ->
    if files? && files.length > 0
      opts = {}
      if files.length == 1
        dbg 'Seeding file ' + files[0].name
      else

        opts.name = name
      $rootScope.client.processing = true
      $rootScope.client.seed files, opts, $rootScope.onSeed
      delete opts.name

  $rootScope.openTorrentFile = (file) ->
    if file?
      dbg 'Adding torrent file ' + file.name
      $rootScope.client.processing = true
      $rootScope.client.add file, opts, $rootScope.onTorrent

  $rootScope.client.on 'error', (err, torrent) ->
    $rootScope.client.processing = false
