/// <summary> /// Handles the DoWork event of the bgw control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.ComponentModel.DoWorkEventArgs"/> instance containing the event data.</param> private void bgw_DoWork(object sender, DoWorkEventArgs e) { this.bgw.ReportProgress(17, "Loading Media Path Database"); DatabaseIOFactory.Load(DatabaseIOFactory.OutputName.MediaPathDb); this.bgw.ReportProgress(34, "Loading Movie Database"); DatabaseIOFactory.Load(DatabaseIOFactory.OutputName.MovieDb); this.bgw.ReportProgress(51, "Loading Media Sets Database"); DatabaseIOFactory.Load(DatabaseIOFactory.OutputName.MovieSets); this.bgw.ReportProgress(68, "Loading Tv Database"); DatabaseIOFactory.Load(DatabaseIOFactory.OutputName.TvDb); this.bgw.ReportProgress(80, "Loading Media Path Database"); DatabaseIOFactory.Load(DatabaseIOFactory.OutputName.ScanSeriesPick); this.bgw.ReportProgress(88, "Populating Movie Media Database"); MasterMediaDBFactory.PopulateMasterMovieMediaDatabase(); this.bgw.ReportProgress(96, "Populating TV Media Database"); MasterMediaDBFactory.PopulateMasterTvMediaDatabase(); this.bgw.ReportProgress(97, "Validating Sets"); MovieSetManager.ValidateSets(); this.bgw.ReportProgress(100, "Done."); }
/// <summary> /// Loads the specified output name. /// </summary> /// <param name="outputName"> /// Name of the output. /// </param> public static void Load(OutputName outputName) { switch (outputName) { case OutputName.MovieDb: LoadMovieDB(); break; case OutputName.MediaPathDb: LoadMediaPathDb(); break; case OutputName.MovieSets: LoadMovieSets(); break; case OutputName.TvDb: LoadTvDB(); break; case OutputName.ScanSeriesPick: LoadScanSeriesPick(); break; case OutputName.All: LoadMovieDB(); LoadMovieSets(); LoadMediaPathDb(); MasterMediaDBFactory.PopulateMasterMovieMediaDatabase(); LoadTvDB(); LoadScanSeriesPick(); MasterMediaDBFactory.PopulateMasterTvMediaDatabase(); break; } }
/// <summary> /// Merges the import database with main movie database /// </summary> public static void MergeImportDatabaseWithMain() { ValidateDatabaseExistance(); MovieDBFactory.MergeWithDatabase(ImportDatabase); MasterMediaDBFactory.PopulateMasterMovieMediaDatabase(); MovieDBFactory.MergeWithDatabase(ImportDuplicatesDatabase, MovieDBFactory.MovieDBTypes.Duplicates); MovieSetManager.ScanForSetImages(); }
/// <summary> /// Merges the import database with main movie database /// </summary> public static void MergeImportDatabaseWithMain() { MovieDBFactory.MergeWithDatabase(ImportDatabase); MasterMediaDBFactory.PopulateMasterMovieMediaDatabase(); MovieSetManager.ScanForSetImages(); }