StringBuffer sb = new StringBuffer();
Object[] selectedDataSources = tv.getSelectedDataSources(true);
for (Object ds : selectedDataSources) {
if (ds instanceof DownloadManager) {
DownloadManager dm = (DownloadManager) ds;
TOTorrent torrent = dm.getTorrent();
if (torrent != null) {
try {
sb.append(torrent.getHashWrapper().toBase32String());
sb.append('\n');
} catch (TOTorrentException e) {
}
}
} else if (ds instanceof DiskManagerFileInfo) {
DiskManagerFileInfo fileInfo = (DiskManagerFileInfo) ds;
DownloadManager dm = fileInfo.getDownloadManager();
TOTorrent torrent = dm.getTorrent();
if (torrent != null) {
try {
sb.append(torrent.getHashWrapper().toBase32String());
sb.append(';');
sb.append(fileInfo.getIndex());
sb.append('\n');
onlyDMs = false;
} catch (TOTorrentException e) {