altget.start();
}
public static void removeDownload(final String name, final PluginInterface pm){
final DownloadManager dm;
dm = pm.getDownloadManager();
View.DML_BOOLEAN = false;
DownloadManagerListener dml = new DownloadManagerListener()
{
public void
downloadAdded(
final Download download )
{
if(download.getName().equals(name))
{
View.DML_BOOLEAN = true;
try
{
if(download.getState() != Download.ST_STOPPED)
download.stop();
download.remove(true,true);
dm.removeListener(this);
} catch (DownloadException e) {
e.printStackTrace();
} catch (DownloadRemovalVetoException e1) {
e1.printStackTrace();
}
}
dm.removeListener(this);
}
public void
downloadRemoved(
Download download )
{
}
};
dm.addListener(dml);
}