Search in sources :

Example 1 with Genre

use of butter.droid.provider.base.filter.Genre in project butter-android by butterproject.

the class MediaListPresenterImpl method onGenreChanged.

@Override
public void onGenreChanged(UiGenre genre) {
    Genre g = genre.getGenre();
    if (filter.getGenre() == null || !filter.getGenre().equals(g)) {
        filter = new Filter(g, filter.getSorter(), filter.getQuery());
        items.clear();
        view.refreshAdapter();
    }
}
Also used : Filter(butter.droid.provider.base.filter.Filter) Genre(butter.droid.provider.base.filter.Genre) UiGenre(butter.droid.ui.main.genre.list.model.UiGenre)

Example 2 with Genre

use of butter.droid.provider.base.filter.Genre in project butter-android by butterproject.

the class MockMediaProvider method mapEpisodes.

private Episode[] mapEpisodes(MockEpisode[] mockEpisodes) {
    Episode[] episodes = new Episode[mockEpisodes.length];
    for (int i = 0; i < mockEpisodes.length; i++) {
        MockEpisode episode = mockEpisodes[i];
        episodes[i] = new Episode(String.valueOf(episode.getId()), episode.getTitle(), episode.getYear(), new Genre[0], -1, episode.getPoster(), episode.getBackdrop(), episode.getSynopsis(), new Torrent[] { new Torrent(episode.getTorrent(), new Format(episode.getQuality(), Format.FORMAT_NORMAL), 0) }, episode.getEpisdoe());
    }
    return episodes;
}
Also used : MockEpisode(butter.droid.provider.mock.model.MockEpisode) Episode(butter.droid.provider.base.model.Episode) MockEpisode(butter.droid.provider.mock.model.MockEpisode) Torrent(butter.droid.provider.base.model.Torrent) Format(butter.droid.provider.base.model.Format) Genre(butter.droid.provider.base.filter.Genre)

Aggregations

Genre (butter.droid.provider.base.filter.Genre)2 Filter (butter.droid.provider.base.filter.Filter)1 Episode (butter.droid.provider.base.model.Episode)1 Format (butter.droid.provider.base.model.Format)1 Torrent (butter.droid.provider.base.model.Torrent)1 MockEpisode (butter.droid.provider.mock.model.MockEpisode)1 UiGenre (butter.droid.ui.main.genre.list.model.UiGenre)1