hasMovieFile method

Future<bool> hasMovieFile(
  1. Movie movie
)

Checks if a movie file exists (i.e. user has interacted with this movie). For local storage, this checks if the user has either a rating or comment.

Implementation

Future<bool> hasMovieFile(Movie movie) async {
  final hasRating = await getPersonalRating(movie) != null;
  final hasComment = await getMovieComments(movie) != null &&
      (await getMovieComments(movie))!.isNotEmpty;
  return hasRating || hasComment;
}