     $rootScope.client.processing = true
     setTimeout ->
       dbg 'Adding ' + $location.hash()
-      $rootScope.client.add $location.hash(), $rootScope.onTorrent
+      $rootScope.addMagnet $location.hash()
     , 0
 ]
 

    $rootScope.client.processing = true
    setTimeout ->
      dbg 'Adding ' + $location.hash()
      $rootScope.client.add $location.hash(), onTorrent
    , 0
]


        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
