ShareItem item = (ShareItem)items.get(i);
try{
Torrent t = item.getTorrent();
TrackerTorrent tracker_torrent = tracker.getTorrent( t );
Download download = dm.getDownload( t );
if ( tracker_torrent == null || download == null ){
continue;
}
int dl_state = download.getState();
if ( dl_state == Download.ST_ERROR ){
}else if ( dl_state != Download.ST_STOPPED ){
if ( do_stop ){
try{
download.stop();
}catch( Throwable e ){
}
try{
tracker_torrent.stop();
}catch( Throwable e ){
}
}
}else{
if ( !do_stop ){
try{
download.restart();
}catch( Throwable e ){
}
try{
tracker_torrent.start();
}catch( Throwable e ){
}
}
}
}catch( Throwable e ){