Search in sources :

Example 6 with Torrent

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);
}
Also used : Torrent(butter.droid.provider.base.model.Torrent) Movie(butter.droid.provider.base.model.Movie) TorrentHealth(butter.droid.base.torrent.TorrentHealth)

Aggregations

Torrent (butter.droid.provider.base.model.Torrent)6 Episode (butter.droid.provider.base.model.Episode)2 Movie (butter.droid.provider.base.model.Movie)2 AlertDialog (android.app.AlertDialog)1 Context (android.content.Context)1 Bundle (android.os.Bundle)1 ArrayObjectAdapter (android.support.v17.leanback.widget.ArrayObjectAdapter)1 ClassPresenterSelector (android.support.v17.leanback.widget.ClassPresenterSelector)1 DetailsOverviewRow (android.support.v17.leanback.widget.DetailsOverviewRow)1 HeaderItem (android.support.v17.leanback.widget.HeaderItem)1 ListRow (android.support.v17.leanback.widget.ListRow)1 Fragment (android.support.v4.app.Fragment)1 MediaDisplayManager (butter.droid.base.manager.internal.media.MediaDisplayManager)1 MediaWrapper (butter.droid.base.providers.media.model.MediaWrapper)1 StreamInfo (butter.droid.base.providers.media.model.StreamInfo)1 TorrentHealth (butter.droid.base.torrent.TorrentHealth)1 Genre (butter.droid.provider.base.filter.Genre)1 Format (butter.droid.provider.base.model.Format)1 Season (butter.droid.provider.base.model.Season)1 MockEpisode (butter.droid.provider.mock.model.MockEpisode)1