use of butter.droid.provider.base.model.Torrent in project butter-android by butterproject.
the class MediaDetailPresenterImpl method healthClicked.
@Override
public void healthClicked() {
Torrent torrent;
if (selectedTorrent != null) {
torrent = selectedTorrent;
} else {
Movie movie = (Movie) this.media.getMedia();
torrent = movie.getTorrents()[0];
}
int seeds = torrent.getSeeds();
int peers = torrent.getPeers();
TorrentHealth health = TorrentHealth.calculate(seeds, peers);
view.displayHealthInfo(health, seeds, peers);
}
Aggregations