hasMovieFile method

Future<bool> hasMovieFile(
  1. Movie movie
)

Checks if a movie file exists (i.e. user has interacted with this movie). This is only relevant for POD storage.

Implementation

Future<bool> hasMovieFile(Movie movie) async {
  if (_isPodStorageEnabled && _podService != null) {
    return _podService!.hasMovieFile(movie);
  }
  // For local storage, check if either rating or comment exists.

  final hasRating = await getPersonalRating(movie) != null;
  final hasComment = await getMovieComments(movie) != null &&
      (await getMovieComments(movie))!.isNotEmpty;
  return hasRating || hasComment;
}