예제 #1
0
 public bool StartDownload(byte[] content, string filename, string label, string hash, string option)
 {
     try
     {
         global::AzureusEngine.AzCommunication.Torrent tor = prot.TorrentManager.createFromBEncodedData(content);
         Download dl = prot.DownloadManager.AddDownload(tor);
         dl.Category = label;
     }
     catch (Exception ex)
     {
         return(false);
     }
     return(true);
 }
예제 #2
0
        public bool StartDownload(Uri uri, string label, string hash, string option)
        {
            TorrentDownloader dler = prot.TorrentManager.GetURLDownloader(uri.ToString());

            global::AzureusEngine.AzCommunication.Torrent tor = dler.Download();
            Download dl = prot.DownloadManager.AddDownload(tor);

            if (dl == null)
            {
                return(false);
            }
            if (label != "")
            {
                dl.Category = label;
            }
            TorrentAdded(toUtorrent(dl));

            return(true);
        }