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

    if magnet? && magnet.length > 0
      dbg 'Adding magnet/hash ' + magnet
      $rootScope.client.processing = true
      $rootScope.client.add magnet, opts, onTorrent || $rootScope.onTorrent

  $rootScope.destroyedTorrent = (err) ->
    if err

    duration: 2000
    html: true

  onTorrent = (torrent) ->
    $rootScope.viewerStyle = {'margin-top': '-20px', 'text-align': 'center'}
    dbg torrent.magnetURI
    torrent.safeTorrentFileURL = torrent.torrentFileBlobURL
