Exemple #1
0
        public static void Init()
        {
            JMMUser.Populate();
            CloudAccount.Populate();
            ImportFolder.Populate();
            AniDB_Anime.Populate();
            AniDB_Episode.Populate();
            AniDB_File.Populate();
            AniDB_Anime_Title.Populate();
            AniDB_Anime_Tag.Populate();
            AniDB_Tag.Populate();
            CustomTag.Populate();
            CrossRef_CustomTag.Populate();
            CrossRef_File_Episode.Populate();
            VideoLocalPlace.Populate();
            VideoLocal.Populate();
            VideoLocalUser.Populate();
            GroupFilter.Populate();
            AnimeEpisode.Populate();
            AnimeEpisode_User.Populate();
            AnimeSeries.Populate();
            AnimeSeries_User.Populate();
            AnimeGroup.Populate();
            AnimeGroup_User.Populate();

            // Update Contracts if necessary
            try
            {
                JMMUser.RegenerateDb();
                CloudAccount.RegenerateDb();
                ImportFolder.RegenerateDb();
                AniDB_Anime.RegenerateDb();
                AniDB_Episode.RegenerateDb();
                AniDB_File.RegenerateDb();
                AniDB_Anime_Title.RegenerateDb();
                AniDB_Anime_Tag.RegenerateDb();
                AniDB_Tag.RegenerateDb();
                CustomTag.RegenerateDb();
                CrossRef_CustomTag.RegenerateDb();
                CrossRef_File_Episode.RegenerateDb();
                VideoLocalPlace.RegenerateDb();
                VideoLocal.RegenerateDb();
                VideoLocalUser.RegenerateDb();
                AnimeEpisode.RegenerateDb();
                AnimeEpisode_User.RegenerateDb();
                AnimeSeries.RegenerateDb();
                AnimeSeries_User.RegenerateDb();
                AnimeGroup.RegenerateDb();
                AnimeGroup_User.RegenerateDb();

                GroupFilter.RegenerateDb();
                GroupFilter.PostProcess();
            }
            catch (Exception e)
            {
                LogManager.GetCurrentClassLogger().Error(e, "There was an error starting the Database Factory");
            }
            CleanUpMemory();
        }
Exemple #2
0
        public static void Init()
        {
            JMMUser.Populate();
            CloudAccount.Populate();
            ImportFolder.Populate();
            AniDB_Anime.Populate();
            AniDB_Episode.Populate();
            AniDB_File.Populate();
            AniDB_Anime_Title.Populate();
            AniDB_Anime_Tag.Populate();
            AniDB_Tag.Populate();
            CustomTag.Populate();
            CrossRef_CustomTag.Populate();
            CrossRef_File_Episode.Populate();
            VideoLocalPlace.Populate();
            VideoLocal.Populate();
            VideoLocalUser.Populate();
            GroupFilter.Populate();
            AnimeEpisode.Populate();
            AnimeEpisode_User.Populate();
            AnimeSeries.Populate();
            AnimeSeries_User.Populate();
            AnimeGroup.Populate();
            AnimeGroup_User.Populate();

            // Update Contracts if necessary
            JMMUser.RegenerateDb();
            CloudAccount.RegenerateDb();
            ImportFolder.RegenerateDb();
            AniDB_Anime.RegenerateDb();
            AniDB_Episode.RegenerateDb();
            AniDB_File.RegenerateDb();
            AniDB_Anime_Title.RegenerateDb();
            AniDB_Anime_Tag.RegenerateDb();
            AniDB_Tag.RegenerateDb();
            CustomTag.RegenerateDb();
            CrossRef_CustomTag.RegenerateDb();
            CrossRef_File_Episode.RegenerateDb();
            VideoLocalPlace.RegenerateDb();
            VideoLocal.RegenerateDb();
            VideoLocalUser.RegenerateDb();
            AnimeEpisode.RegenerateDb();
            AnimeEpisode_User.RegenerateDb();
            AnimeSeries.RegenerateDb();
            AnimeSeries_User.RegenerateDb();
            AnimeGroup.RegenerateDb();
            AnimeGroup_User.RegenerateDb();

            GroupFilter.RegenerateDb();
            GroupFilter.PostProcess();
            CleanUpMemory();
        }