public static boolean canProgressiveOrIsComplete(TOTorrent torrent) {
if (torrent == null) {
return false;
}
try {
DownloadManagerEnhancer enhancer = DownloadManagerEnhancer.getSingleton();
EnhancedDownloadManager edm = DownloadManagerEnhancer.getSingleton().getEnhancedDownload(
torrent.getHash());
if (edm == null) {
return enhancer.isProgressiveAvailable()
&& PlatformTorrentUtils.isContentProgressive(torrent);
}
boolean complete = edm.getDownloadManager().isDownloadComplete(false);
if (complete) {