@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 switchWatchlistMovie(Movie movie) { if (movie.inWatchlist) { traktWrapper.movieService().unwatchlist().movie(movie.imdbId).fire(); } else { traktWrapper.movieService().watchlist().movie(movie.imdbId).fire(); } }
@Background public void checkinMovie(Movie movie) { Response r = traktWrapper.movieService().checkin(movie.imdbId).fire(); if (r.status.equals("failure")) { throw new TraktException("None", null, new ApiException("checkinfailed"), r); } traktWrapper.currentItem = (MediaBase) movie; traktWrapper.currentItemActivity = SingleMovieActivity.class; }
@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; }
@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(); } }