private bool MovieMatch(IMDBMovie myVideosMovie, TraktMovieBase traktMovie) { // IMDb comparison if (!string.IsNullOrEmpty(traktMovie.IMDBID) && !string.IsNullOrEmpty(BasicHandler.GetProperMovieImdbId(myVideosMovie.IMDBNumber))) { return(string.Compare(BasicHandler.GetProperMovieImdbId(myVideosMovie.IMDBNumber), traktMovie.IMDBID, true) == 0); } // Title & Year comparison return(string.Compare(myVideosMovie.Title, traktMovie.Title, true) == 0 && myVideosMovie.Year.ToString() == traktMovie.Year.ToString()); }
public static bool FindMovieID(string title, int year, string imdbid, ref IMDBMovie imdbMovie) { // get all movies ArrayList myvideos = new ArrayList(); VideoDatabase.GetMovies(ref myvideos); // get all movies in local database List <IMDBMovie> movies = (from IMDBMovie m in myvideos select m).ToList(); // try find a match IMDBMovie movie = movies.Find(m => BasicHandler.GetProperMovieImdbId(m.IMDBNumber) == imdbid || (string.Compare(m.Title, title, true) == 0 && m.Year == year)); if (movie == null) { return(false); } imdbMovie = movie; return(true); }
public static bool FindMovie(string title, int year, string imdbid, ref int?movieid, ref string config) { // get all movies ArrayList myvideos = new ArrayList(); BaseMesFilms.GetMovies(ref myvideos); // get all movies in local database List <MFMovie> movies = (from MFMovie m in myvideos select m).ToList(); // try find a match MFMovie movie = movies.Find(m => BasicHandler.GetProperMovieImdbId(m.IMDBNumber) == imdbid || (string.Compare(m.Title, title, true) == 0 && m.Year == year)); if (movie == null) { return(false); } movieid = movie.ID; config = movie.Config; return(true); }