try {
hash = torrent.getHash();
} catch (TOTorrentException e1) {
}
DownloadManager dm = core.getGlobalManager().addDownloadManager(
torrent_file.toString(),
hash,
save_dir.toString(),
default_start_stopped ? DownloadManager.STATE_STOPPED
: DownloadManager.STATE_QUEUED, true, // persistent
true, // for seeding
null); // no adapter required
if (!default_start_stopped && dm != null) {
// We want this to move to seeding ASAP, so move it to the top
// of the download list, where it will do the quick check and
// move to the seeding list
// (the for seeding flag should really be smarter and verify
// it's a seeding torrent and set appropriately)
dm.getGlobalManager().moveTop(new DownloadManager[] {
dm
});
}
if (_wizard.autoHost