public static void Full() { var nfpox = System.Web.HttpContext.Current.Server.MapPath("~/dbfiles/fixedAPI.NFPOX"); // Database.SetInitializer(new DropCreateDatabaseIfModelChanges<MovieDbContext>()); Tools.TraceLine("In Full"); Tools.UpdateGenreList(nfpox); //build a genres txt file for all the genres in the NFPOX //ASSUMES GENRES.NFPOX IS THERE PopulateGenres.PopulateGenresTable(); //parse the lines into a Title then Movie object, along with boxart data and genre Tools.BuildMoviesBoxartGenresTables(nfpox); Tools.TraceLine("Out Full"); }
public static void FullDbBuild() { MovieDbContext db = new MovieDbContext(); string netflixPosFilepath = System.Web.HttpContext.Current.Server.MapPath("~/dbfiles/fixedAPI.NFPOX"); //retrieve API .POX var netflixCatalogOutputPath = OAuth1a.GetNextflixCatalogDataString("catalog/titles/streaming", "", outputPath: netflixPosFilepath); var genresNFPOX = System.Web.HttpContext.Current.Server.MapPath("~/dbfiles/genres.NFPOX"); var omdbZIP = System.Web.HttpContext.Current.Server.MapPath("~/dbfiles/omdb.zip"); var omdbDUMP = System.Web.HttpContext.Current.Server.MapPath("~/dbfiles/omdb.DUMP"); var omdbTXT = System.Web.HttpContext.Current.Server.MapPath("~/dbfiles/omdb.txt"); var tomatoesTXT = System.Web.HttpContext.Current.Server.MapPath("~/dbfiles/tomatoes.txt"); //join the lines that don't match <catalog to the ones above it Tools.JoinLines(netflixPosFilepath); //Parse the netflix NFPOX and make sure the genres.nfpox exists and is up to date Tools.UpdateGenreList(netflixPosFilepath); //build a genres txt file for all the genres in the NFPOX //ASSUMES GENRES.NFPOX IS THERE PopulateGenres.PopulateGenresTable(); //parse the lines into a Title then Movie object, along with boxart data and genre Tools.BuildMoviesBoxartGenresTables(netflixPosFilepath); //download the omdbapi Omdb.DownloadOmdbZipAndExtract(omdbZIP); ////parse it for omdbentrys, serialize it to file //Tools.SerializeOmdbTsv(omdbDUMP, omdbTXT, tomatoesTXT); ////deserialize the file, turn it into omdb //// can't remember if it does it here or not, but marry the omdbs and movie //Tools.RebuildOmdbsFromProtobufDump(omdbDUMP); //new way to turn the TSV into Omdb db TSVParse.OptimizedPopulateOmdbTableFromTsv(omdbTXT, tomatoesTXT); Tools.MarryMovieToOmdb(db); }