@Background public void switchWatchlistShow(TvShow show) { if (show.inWatchlist != null || show.inWatchlist) { traktWrapper.showService().unwatchlist().imdbId(show.imdbId).fire(); } else { traktWrapper.showService().watchlist().imdbId(show.imdbId).fire(); } }
@Background public void switchWatchlistEpisode(TvShow show, TvShowEpisode episode) { if (episode.inWatchlist) { traktWrapper .showService() .episodeUnwatchlist(show.imdbId) .episode(episode.season, episode.number) .fire(); } else { traktWrapper .showService() .episodeWatchlist(show.imdbId) .episode(episode.season, episode.number) .fire(); } }
@Background public void checkinEpisode(TvShow show, TvShowEpisode episode) { Response r = traktWrapper .showService() .checkin(Integer.parseInt(show.tvdbId)) .season(episode.season) .episode(episode.number) .fire(); if (r.status.equals("failure")) { throw new TraktException("None", null, new ApiException("checkinfailed"), r); } // traktWrapper.currentItem = (MediaBase) episode; traktWrapper.currentItemActivity = SingleEpisodeActivity.class; }