public ConcurrentImdbMovieParser(uint imdbID)
        {
            movieData = new ImdbMovie(imdbID);

            this.mainPageJob = new JobWebPageDownload(IMDBUtil.getURLToMovie(imdbID));
            this.awardsPageJob = new JobWebPageDownload(IMDBUtil.getAwardsURLToMovie(imdbID));
            this.creditsPageJob = new JobWebPageDownload(IMDBUtil.getFullcreditsURLToMovie(imdbID));

            this.addJob(mainPageJob);
            this.addJob(awardsPageJob);
            this.addJob(creditsPageJob);
        }
Esempio n. 2
0
 public JobImdbMovieParser(string mainPage, string creditsPage, string awardsPage, ImdbMovie movieToFillOut)
 {
     this.initialize(mainPage, creditsPage, awardsPage, movieToFillOut);
 }
Esempio n. 3
0
        private void initialize(string mainPage, string creditsPage, string awardsPage, ImdbMovie movieToFillOut)
        {
            this.movie = movieToFillOut;
            this.mainPage = mainPage;
            this.creditsPage = creditsPage;
            this.awardsPage = awardsPage;

            if (mainPage != null) {
                startSelectiveParse += this.extractTitleAndYear;
                startSelectiveParse += this.extractPlot;
                startSelectiveParse += this.extractRuntime;
                startSelectiveParse += this.extractOriginalTitle;
                startSelectiveParse += this.extractGenres;
                startSelectiveParse += this.extractIMDBRating;
                startSelectiveParse += this.extractIMDBRatingVotes;
                startSelectiveParse += this.extractLanguages;
                startSelectiveParse += this.extractCountries;
                startSelectiveParse += this.extractAlsoKnownAs;
                startSelectiveParse += this.extractStars;
            }
            if (creditsPage != null) {
                startSelectiveParse += this.extractDirectors;
                startSelectiveParse += this.extractWriters;
                startSelectiveParse += this.extractCast;
            }
            if (awardsPage != null) {
                startSelectiveParse += extractAwards;
            }
        }
Esempio n. 4
0
 public void imdbParseFinished(ConcThreadJobMaster sender)
 {
     ConcurrentImdbMovieParser parser = (ConcurrentImdbMovieParser)sender;
     this.imdbMovie = parser.movieData;
 }
Esempio n. 5
0
 public Movie(ImdbMovie imdbMovie)
 {
     this.imdbMovie = imdbMovie;
     this.persons = new List<ImdbPerson>();
 }
Esempio n. 6
0
        private void updateImdbMovie(ImdbMovie movie, int idMovies)
        {
            SQLiteCommand command = new SQLiteCommand(connection);

            command.CommandText = "UPDATE Movies SET " +
                "title=@title, " +
                "runtime=@runtime, " +
                "plot=@plot, " +
                "originalTitle=@originalTitle, " +
                "imdbRating=@imdbRating, " +
                "imdbRatingVotes=@imdbRatingVotes, " +
                "imdbTop250=@imdbTop250, " +
                "metacriticsReviewRating=@metacriticsReviewRating, " +
                "metacriticsUsersRating=@metacriticsUsersRating, " +
                "rottenTomatoesAudience=@rottenTomatoesAudience, " +
                "year=@year, " +
                "tomatometer=@tomatometer, " +
                "boxofficeWorldwide=@boxofficeWorldwide, " +
                "personalRating=@personalRating, " +
                "boxofficeAmerica=@boxofficeAmerica, " +
                "boxofficeFirstWeekend=@boxofficeFirstWeekend, " +
                "boxofficeForeign=@boxofficeForeign, " +
                "rangFirstWeekend=@rangFirstWeekend, " +
                "rankAllTime=@rankAllTime, " +
                "weeksInCinema=@weeksInCinema, " +
                "otherWins=@otherWins, " +
                "otherNominations=@otherNominations, " +
                "notes=@notes, " +
                "seenCount=@seenCount, " +
                "TVSeries=@TVSeries, " +
                "lastSeen=@lastSeen, " +
                "budget=@budget " +
                "WHERE idMovies=@idMovies";

            var param = new SQLiteParameter("@title") { Value = movie.title };
            command.Parameters.Add(param);
            param = new SQLiteParameter("@runtime") { Value = movie.runtime };
            command.Parameters.Add(param);
            param = new SQLiteParameter("@plot") { Value = movie.plot };
            command.Parameters.Add(param);
            param = new SQLiteParameter("@originalTitle") { Value = movie.originalTitle };
            command.Parameters.Add(param);
            param = new SQLiteParameter("@imdbID") { Value = movie.imdbID };
            command.Parameters.Add(param);
            param = new SQLiteParameter("@imdbRating") { Value = movie.imdbRating };
            command.Parameters.Add(param);
            param = new SQLiteParameter("@imdbRatingVotes") { Value = movie.imdbRatingVotes };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@imdbTop250") { Value = -1 };
            command.Parameters.Add(param);
            //TODO
            /*
             * Meta ID oben entfernt!!
            param = new SQLiteParameter("@metacriticsID") { Value = "" };
            command.Parameters.Add(param);
             * */
            //TODO
            param = new SQLiteParameter("@metacriticsReviewRating") { Value = -1 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@metacriticsUsersRating") { Value = -1 };
            command.Parameters.Add(param);

            /*
             * entfernt
            param = new SQLiteParameter("@rottentomatoesID") { Value = 0 };
            command.Parameters.Add(param);
            */
            //TODO
            param = new SQLiteParameter("@rottenTomatoesAudience") { Value = -1 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@tomatometer") { Value = -1 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@personalRating") { Value = -1 };
            command.Parameters.Add(param);
            param = new SQLiteParameter("@year") { Value = movie.year };
            command.Parameters.Add(param);
            //TODO
            /*
             * oben entfernt
            param = new SQLiteParameter("@boxofficemojoID") { Value = "" };
            command.Parameters.Add(param);
             */
            //TODO
            param = new SQLiteParameter("@boxofficeWorldwide") { Value = 0 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@boxofficeAmerica") { Value = 0 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@boxofficeForeign") { Value = 0 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@boxofficeFirstWeekend") { Value = 0 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@rangFirstWeekend") { Value = -1 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@rankAllTime") { Value = -1 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@weeksInCinema") { Value = -1 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@otherWins") { Value = -1 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@otherNominations") { Value = -1 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@notes") { Value = "" };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@seenCount") { Value = -1 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@TVSeries") { Value = 0 };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@lastSeen") { Value = DateTime.MinValue };
            command.Parameters.Add(param);
            //TODO
            param = new SQLiteParameter("@budget") { Value = 0 };
            command.Parameters.Add(param);
            param = new SQLiteParameter("@idMovies") { Value = idMovies };
            command.Parameters.Add(param);

            executeCommandThreadSafe(command);
        }
Esempio n. 7
0
 public SerialImdbMovieParser(uint imdbID)
 {
     movieData = new ImdbMovie(imdbID);
     this.imdbID = imdbID;
 }