예제 #1
0
 @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();
   }
 }
예제 #2
0
 @Background
 public void switchWatchlistMovie(Movie movie) {
   if (movie.inWatchlist) {
     traktWrapper.movieService().unwatchlist().movie(movie.imdbId).fire();
   } else {
     traktWrapper.movieService().watchlist().movie(movie.imdbId).fire();
   }
 }
예제 #3
0
 @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;
 }
예제 #4
0
 @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;
 }
예제 #5
0
 @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();
   }
 }