private bool MatchByTmdbId(MovieInfo movieInfo, out Movie movieDetails)
 {
     if (movieInfo.MovieDbId != 0 && _movieDb.GetMovie(movieInfo.MovieDbId, out movieDetails))
     {
         SaveMatchToPersistentCache(movieDetails, movieDetails.Title);
         return(true);
     }
     movieDetails = null;
     return(false);
 }
Esempio n. 2
0
 private bool MatchByImdbId(MovieInfo movieInfo, out Movie movieDetails)
 {
     if (!string.IsNullOrEmpty(movieInfo.ImdbId) && _movieDb.GetMovie(movieInfo.ImdbId, out movieDetails))
     {
         SaveMatchToPersistentCache(movieDetails, movieDetails.Title);
         return(true);
     }
     movieDetails = null;
     return(false);
 }
 private bool MatchByImdbId(MovieInfo movieInfo, out Movie movieDetails)
 {
     if (!string.IsNullOrEmpty(movieInfo.ImdbId) && _movieDb.GetMovie(movieInfo.ImdbId, out movieDetails))
     {
         // Add this match to cache
         MovieMatch onlineMatch = new MovieMatch
         {
             Id          = movieDetails.Id,
             ItemName    = movieDetails.Title,
             MovieDBName = movieDetails.Title
         };
         // Save cache
         _storage.TryAddMatch(onlineMatch);
         return(true);
     }
     movieDetails = null;
     return(false);
 }