}
}
} catch (Exception e) {
}
DownloadManager existingDownload = null;
if (sExistingName == null) {
// Check if torrent already exists in gm, and add if not
existingDownload = (gm == null) ? null : gm.getDownloadManager(torrent);
if (existingDownload != null) {
sExistingName = existingDownload.getDisplayName();
}
}
if (sExistingName == null) {
info = new TorrentInfo(torrentFile.getAbsolutePath(), torrent,
bDeleteFileOnCancel);
info.sOriginatingLocation = sOriginatingLocation;
torrentList.add(info);
} else {
final String sfExistingName = sExistingName;
final DownloadManager fExistingDownload = existingDownload;
Utils.execSWTThread(new AERunnable() {
public void runSupport() {
Shell mainShell = UIFunctionsManagerSWT.getUIFunctionsSWT().getMainShell();
if (Display.getDefault().getActiveShell() == null || !mainShell.isVisible() || mainShell.getMinimized() ) {
new MessageSlideShell(Display.getCurrent(), SWT.ICON_INFORMATION,