if (datasource == null) {
final MdiEntry fEntry = entry;
final String dmHash = MapUtils.getMapString(autoOpenInfo, "dm", null);
if (dmHash != null) {
AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
public void azureusCoreRunning(AzureusCore core) {
GlobalManager gm = core.getGlobalManager();
HashWrapper hw = new HashWrapper(Base32.decode(dmHash));
DownloadManager dm = gm.getDownloadManager(hw);
if (dm != null) {
fEntry.setDatasource(dm);
}
}
});
} else {
final List listHashes = MapUtils.getMapList(autoOpenInfo, "dms",
null);
if (listHashes != null) {
AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
public void azureusCoreRunning(AzureusCore core) {
List<DownloadManager> listDMS = new ArrayList<DownloadManager>(
1);
GlobalManager gm = core.getGlobalManager();
for (Object oDM : listHashes) {