Skip to content

Instantly share code, notes, and snippets.

@rharter
Created October 2, 2014 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rharter/9c99318faf116317d426 to your computer and use it in GitHub Desktop.
Save rharter/9c99318faf116317d426 to your computer and use it in GitHub Desktop.
public Observable<Show> getShows() {
return authClient.getAuthString()
.flatMap(token -> contentApi.getShows(token, selectedMediaServer))
.flatMap(shows -> Observable.from(shows.getShows()))
.flatMap(this::getImdbId);
}
public Observable<Show> getImdbId(Show show) {
return omdbApi.searchByTitle(show.getTitle())
.flatMap(movie -> {
show.setImdbId(movie.getImdbId());
return Observable.just(show);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment