Пример #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();
   }
 }