use of app.philm.in.model.PhilmMovie in project philm by chrisbanes.
the class MovieController method fetchDetailMovie.
private void fetchDetailMovie(final int callingId, String id) {
Preconditions.checkNotNull(id, "id cannot be null");
final PhilmMovie movie = mMoviesState.getMovie(id);
if (movie != null) {
fetchDetailMovieIfNeeded(callingId, movie, true);
} else {
// TODO Try and parse id to guess type
fetchDetailMovieFromTrakt(callingId, id);
}
}
use of app.philm.in.model.PhilmMovie in project philm by chrisbanes.
the class MovieController method fetchMovieImages.
private void fetchMovieImages(final int callingId, String id) {
Preconditions.checkNotNull(id, "id cannot be null");
PhilmMovie movie = mMoviesState.getMovie(id);
if (movie != null && movie.getTmdbId() != null) {
executeTask(new FetchTmdbMovieImagesRunnable(callingId, movie.getTmdbId()));
}
}
use of app.philm.in.model.PhilmMovie in project philm by chrisbanes.
the class MovieController method fetchDetailMovieFromTrakt.
private void fetchDetailMovieFromTrakt(final int callingId, String id) {
Preconditions.checkNotNull(id, "id cannot be null");
PhilmMovie movie = mMoviesState.getMovie(id);
if (movie != null) {
movie.markFullFetchStarted(PhilmModel.TYPE_TRAKT);
}
executeTask(new FetchTraktDetailMovieRunnable(callingId, id));
}
use of app.philm.in.model.PhilmMovie in project philm by chrisbanes.
the class MovieController method populateCheckinUi.
private void populateCheckinUi(MovieCheckinUi ui) {
final PhilmMovie movie = mMoviesState.getMovie(ui.getRequestParameter());
final PhilmUserProfile userProfile = mMoviesState.getUserProfile();
if (movie != null) {
ui.setMovie(movie);
ui.showFacebookShare(userProfile != null && userProfile.isFacebookConnected());
ui.showTwitterShare(userProfile != null && userProfile.isTwitterConnected());
ui.showTumblrShare(userProfile != null && userProfile.isTumblrConnected());
ui.showPathShare(userProfile != null && userProfile.isPathConnected());
if (userProfile != null && userProfile.getDefaultShareMessage() != null) {
ui.setShareText(userProfile.getDefaultShareMessage().replace(Constants.TRAKT_MESSAGE_ITEM_REPLACE, movie.getTitle()));
}
}
}
use of app.philm.in.model.PhilmMovie in project philm by chrisbanes.
the class MovieController method fetchMovieImagesIfNeeded.
private void fetchMovieImagesIfNeeded(final int callingId, String id) {
Preconditions.checkNotNull(id, "id cannot be null");
PhilmMovie movie = mMoviesState.getMovie(id);
if (movie != null && PhilmCollections.isEmpty(movie.getBackdropImages())) {
fetchMovieImages(callingId, id);
}
}
Aggregations