Exemple #1
0
  private static boolean canPlay(TOTorrent torrent, int file_index) {
    if (!PlatformTorrentUtils.isContent(torrent, false)) {
      return false;
    }

    if (!AzureusCoreFactory.isCoreRunning()) {
      return false;
    }

    GlobalManager gm = AzureusCoreFactory.getSingleton().getGlobalManager();
    DownloadManager dm = gm.getDownloadManager(torrent);

    if (dm != null) {
      return dm.getAssumedComplete() || canUseEMP(torrent, file_index);
    }
    return canUseEMP(torrent, file_index);
  }