void btnToolbarHelp_Click(object sender, RoutedEventArgs e) { //AnimeSeriesRepository repSeries = new AnimeSeriesRepository(); //AnimeSeries ser = repSeries.GetByID(222); //ser.UpdateStats(true, true, true); //TraktTVHelper.GetFriendsRequests(); //FileHashHelper.GetMediaInfo(@"C:\[Hiryuu] Maken-Ki! 09 [Hi10P 1280x720 H264] [EE47C947].mkv", true); //CommandRequest_ReadMediaInfo cr1 = new CommandRequest_ReadMediaInfo(2038); //cr1.Save(); //CommandRequest_ReadMediaInfo cr2 = new CommandRequest_ReadMediaInfo(2037); //cr2.Save(); /*AniDB_AnimeRepository repAnime = new AniDB_AnimeRepository(); foreach (AniDB_Anime anime in repAnime.GetAll()) { List<TraktTV_ShoutGet> shouts = TraktTVHelper.GetShowShouts(anime.AnimeID); if (shouts == null || shouts.Count == 0) { //logger.Info("{0} ({1}) = 0 Shouts", anime.MainTitle, anime.AnimeID); } else { if (shouts.Count <= 5) logger.Info("{0} ({1}) = {2} MINOR Shouts", anime.MainTitle, anime.AnimeID, shouts.Count); else logger.Info("{0} ({1}) = {2} *** MAJOR *** Shouts", anime.MainTitle, anime.AnimeID, shouts.Count); } }*/ //anime temp = MALHelper.SearchAnimesByTitle("Naruto"); //MALHelper.VerifyCredentials(); //JMMService.DebugFlag = !JMMService.DebugFlag; //AnimeEpisodeRepository repEp = new AnimeEpisodeRepository(); //AnimeEpisode ep = repEp.GetByID(2430); //MALHelper.UpdateMAL(ep); //CommandRequest_MALUpdatedWatchedStatus cmdMAL = new CommandRequest_MALUpdatedWatchedStatus(8107); //cmdMAL.ProcessCommand(); //CommandRequest_MALDownloadStatusFromMAL cmd = new CommandRequest_MALDownloadStatusFromMAL(); //cmd.Save(); //AppVersionsResult appv = XMLService.GetAppVersions(); //JMMServiceImplementation imp = new JMMServiceImplementation(); //imp.GetMissingEpisodes(1, true, true); //VideoLocalRepository repVidLocal = new VideoLocalRepository(); /*VideoLocal vlocal = new VideoLocal(); vlocal.DateTimeUpdated = DateTime.Now; vlocal.DateTimeCreated = vlocal.DateTimeUpdated; vlocal.FilePath = ""; vlocal.FileSize = 656181746; vlocal.ImportFolderID = 1; vlocal.Hash = "453063B2993D4AC4BA51F4A64170260A"; vlocal.CRC32 = ""; vlocal.MD5 = ""; vlocal.SHA1 = ""; vlocal.IsIgnored = 0; vlocal.HashSource = (int)HashSource.DirectHash; repVidLocal.Save(vlocal);*/ //JMMService.AnidbProcessor.UpdateMyListStats(); //UpdateVersion(); /*VideoLocalRepository repVidLocal = new VideoLocalRepository(); VideoLocal vid = repVidLocal.GetByID(194); RenameFileHelper.Test(vid); vid = repVidLocal.GetByID(295); RenameFileHelper.Test(vid); vid = repVidLocal.GetByID(396); RenameFileHelper.Test(vid); vid = repVidLocal.GetByID(497); RenameFileHelper.Test(vid); vid = repVidLocal.GetByID(598); RenameFileHelper.Test(vid); return; JMMService.AnidbProcessor.GetFileInfo(vid); return;*/ //Importer.UpdateAniDBFileData(true, true); //JMMServiceImplementationMetro imp = new JMMServiceImplementationMetro(); //imp.GetAnimeDetail(4880); /*CrossRef_AniDB_MALRepository rep = new CrossRef_AniDB_MALRepository(); foreach (JMMServer.Entities.CrossRef_AniDB_MAL xref in rep.GetAll()) { //AzureWebAPI.Send_CrossRef_AniDB_MAL(xref); break; } AniDB_Anime anime2 = JMMService.AnidbProcessor.GetAnimeInfoHTTP(9127, true, false); AniDB_AnimeRepository repAnime = new AniDB_AnimeRepository(); List<AniDB_Anime> allAnime = repAnime.GetAll(); int cnt = 0; foreach (AniDB_Anime anime in allAnime) { cnt++; logger.Info(string.Format("Uploading anime {0} of {1} - {2}", cnt, allAnime.Count, anime.MainTitle)); try { //CommandRequest_Azure_SendAnimeFull cmdAzure = new CommandRequest_Azure_SendAnimeFull(anime.AnimeID); //cmdAzure.Save(); } catch { } } */ /*try { using (var session = JMMService.SessionFactory.OpenSession()) { AniDB_Anime anime = JMMService.AnidbProcessor.GetAnimeInfoHTTPFromCache(session, 5842, false); } } catch (Exception ex) { Utils.ShowErrorMessage(ex); }*/ //CommandRequest_GetAnimeHTTP cmd = new CommandRequest_GetAnimeHTTP(3482, false, false); //cmd.Save(); //string xml = AzureWebAPI.Get_AnimeXML(3483); //XmlDocument docAnime = new XmlDocument(); //docAnime.LoadXml(xml); //JMMService.AnidbProcessor.IsBanned = true; //JMMService.AnidbProcessor.BanOrigin = "HTTP"; //JMMService.AnidbProcessor.BanTime = DateTime.Now; //GenerateAzureList(); //SendToAzure(); //SendToAzureXML(); //CommandRequest_GetAniDBTitles cmd = new CommandRequest_GetAniDBTitles(); //cmd.Save(); //AzureWebAPI.Delete_CrossRefAniDBTvDB(); /* CrossRef_AniDB_TvDBV2Repository rep = new CrossRef_AniDB_TvDBV2Repository(); List<CrossRef_AniDB_TvDBV2> xrefs = rep.GetAll(); AzureWebAPI.Send_CrossRefAniDBTvDB(xrefs[0], "Test"); */ AboutForm frm = new AboutForm(); frm.Owner = this; frm.ShowDialog(); }
void btnToolbarHelp_Click(object sender, RoutedEventArgs e) { //AnimeSeriesRepository repSeries = new AnimeSeriesRepository(); //AnimeSeries ser = repSeries.GetByID(222); //ser.UpdateStats(true, true, true); //TraktTVHelper.GetFriendsRequests(); //FileHashHelper.GetMediaInfo(@"C:\[Hiryuu] Maken-Ki! 09 [Hi10P 1280x720 H264] [EE47C947].mkv", true); //CommandRequest_ReadMediaInfo cr1 = new CommandRequest_ReadMediaInfo(2038); //cr1.Save(); //CommandRequest_ReadMediaInfo cr2 = new CommandRequest_ReadMediaInfo(2037); //cr2.Save(); //anime temp = MALHelper.SearchAnimesByTitle("Naruto"); //MALHelper.VerifyCredentials(); //JMMService.DebugFlag = !JMMService.DebugFlag; //AnimeEpisodeRepository repEp = new AnimeEpisodeRepository(); //AnimeEpisode ep = repEp.GetByID(2430); //MALHelper.UpdateMAL(ep); //CommandRequest_MALUpdatedWatchedStatus cmdMAL = new CommandRequest_MALUpdatedWatchedStatus(8107); //cmdMAL.ProcessCommand(); //CommandRequest_MALDownloadStatusFromMAL cmd = new CommandRequest_MALDownloadStatusFromMAL(); //cmd.Save(); //AppVersionsResult appv = XMLService.GetAppVersions(); //JMMServiceImplementation imp = new JMMServiceImplementation(); //imp.GetMissingEpisodes(1, true, true); //VideoLocalRepository repVidLocal = new VideoLocalRepository(); /*VideoLocal vlocal = new VideoLocal(); vlocal.DateTimeUpdated = DateTime.Now; vlocal.DateTimeCreated = vlocal.DateTimeUpdated; vlocal.FilePath = ""; vlocal.FileSize = 656181746; vlocal.ImportFolderID = 1; vlocal.Hash = "453063B2993D4AC4BA51F4A64170260A"; vlocal.CRC32 = ""; vlocal.MD5 = ""; vlocal.SHA1 = ""; vlocal.IsIgnored = 0; vlocal.HashSource = (int)HashSource.DirectHash; repVidLocal.Save(vlocal);*/ //JMMService.AnidbProcessor.UpdateMyListStats(); //UpdateVersion(); /*VideoLocalRepository repVidLocal = new VideoLocalRepository(); VideoLocal vid = repVidLocal.GetByID(194); RenameFileHelper.Test(vid); vid = repVidLocal.GetByID(295); RenameFileHelper.Test(vid); vid = repVidLocal.GetByID(396); RenameFileHelper.Test(vid); vid = repVidLocal.GetByID(497); RenameFileHelper.Test(vid); vid = repVidLocal.GetByID(598); RenameFileHelper.Test(vid); return; JMMService.AnidbProcessor.GetFileInfo(vid); return;*/ //Importer.UpdateAniDBFileData(true, true); //JMMServiceImplementationMetro imp = new JMMServiceImplementationMetro(); //imp.GetAnimeDetail(4880); /*CrossRef_AniDB_MALRepository rep = new CrossRef_AniDB_MALRepository(); foreach (JMMServer.Entities.CrossRef_AniDB_MAL xref in rep.GetAll()) { //AzureWebAPI.Send_CrossRef_AniDB_MAL(xref); break; } AniDB_Anime anime2 = JMMService.AnidbProcessor.GetAnimeInfoHTTP(9127, true, false); AniDB_AnimeRepository repAnime = new AniDB_AnimeRepository(); List<AniDB_Anime> allAnime = repAnime.GetAll(); int cnt = 0; foreach (AniDB_Anime anime in allAnime) { cnt++; logger.Info(string.Format("Uploading anime {0} of {1} - {2}", cnt, allAnime.Count, anime.MainTitle)); try { //CommandRequest_Azure_SendAnimeFull cmdAzure = new CommandRequest_Azure_SendAnimeFull(anime.AnimeID); //cmdAzure.Save(); } catch { } } */ /*try { using (var session = JMMService.SessionFactory.OpenSession()) { AniDB_Anime anime = JMMService.AnidbProcessor.GetAnimeInfoHTTPFromCache(session, 5842, false); } } catch (Exception ex) { Utils.ShowErrorMessage(ex); }*/ //CommandRequest_GetAnimeHTTP cmd = new CommandRequest_GetAnimeHTTP(3482, false, false); //cmd.Save(); //string xml = AzureWebAPI.Get_AnimeXML(3483); //XmlDocument docAnime = new XmlDocument(); //docAnime.LoadXml(xml); //JMMService.AnidbProcessor.IsBanned = true; //JMMService.AnidbProcessor.BanOrigin = "HTTP"; //JMMService.AnidbProcessor.BanTime = DateTime.Now; //GenerateAzureList(); //SendToAzure(); //SendToAzureXML(); //CommandRequest_GetAniDBTitles cmd = new CommandRequest_GetAniDBTitles(); //cmd.Save(); //AzureWebAPI.Delete_CrossRefAniDBTvDB(); /* CrossRef_AniDB_TvDBV2Repository rep = new CrossRef_AniDB_TvDBV2Repository(); List<CrossRef_AniDB_TvDBV2> xrefs = rep.GetAll(); AzureWebAPI.Send_CrossRefAniDBTvDB(xrefs[0], "Test"); */ //Azure_AnimeLink aid = AzureWebAPI.Admin_GetRandomLinkForApproval(AzureLinkType.TvDB); /* IEnumerable<TraktV2SearchShowResult> results = TraktTVHelper.SearchShowNew("Trinity"); if (results != null) { foreach (TraktV2SearchShowResult res in results) Console.WriteLine(res.show.Title); } */ // trinity-seven - 10441 //TraktV2ShowExtended show = TraktTVHelper.GetShowInfoV2("madan-no-ou-to-vanadis"); //TraktTVHelper.GetShowCommentsV2(8660); //TraktTVHelper.GetFriendsV2(); //TraktTVHelper.RefreshAuthToken(); //D003BB3D //string ret = TraktTVHelper.EnterTraktPIN("D003BB3D"); //string x = ""; //TraktTVHelper.PostCommentShow("mayday", "this is a test comment", false, ref x); //AnimeEpisodeRepository repEp = new AnimeEpisodeRepository(); //AnimeEpisode ep = repEp.GetByID(32); //TraktTVHelper.SyncEpisodeToTrakt(ep, TraktSyncType.HistoryAdd); //TraktTVHelper.SearchShowByIDV2("tvdb", "279827"); //TraktTVHelper.SearchShowV2("Monster Musume"); //TraktTVHelper.SyncCollectionToTrakt(); //TraktTVHelper.SyncEpisodeToTrakt(TraktSyncType.HistoryAdd, "mad-men", 1, 1, false); //TraktTVHelper.SyncEpisodeToTrakt(TraktSyncType.HistoryRemove, "mad-men", 1, 1, false); //TraktTVHelper.SyncEpisodeToTrakt(TraktSyncType.CollectionAdd, "mad-men", 1, 3, false); //TraktTVHelper.SyncEpisodeToTrakt(TraktSyncType.CollectionRemove, "mad-men", 1, 3, false); //AnimeSeriesRepository repSeries = new AnimeSeriesRepository(); //AnimeSeries ser1 = repSeries.GetByAnimeID(10445); //TraktTVHelper.SyncCollectionToTrakt_Series(ser1); //AnimeSeries ser2 = repSeries.GetByAnimeID(10846); //TraktTVHelper.SyncCollectionToTrakt_Series(ser2); //TraktTVHelper.UpdateAllInfoAndImages("my-teen-romantic-comedy-snafu", true); //TraktTVHelper.CleanupDatabase(); //TraktTVHelper.SyncCollectionToTrakt(); //JMMServer.Providers.Azure.Azure_AnimeLink link2 = JMMServer.Providers.Azure.AzureWebAPI.Admin_GetRandomTraktLinkForApproval(); //List<Providers.Azure.CrossRef_AniDB_Trakt> xrefs= JMMServer.Providers.Azure.AzureWebAPI.Admin_Get_CrossRefAniDBTrakt(link2.RandomAnimeID); AboutForm frm = new AboutForm(); frm.Owner = this; frm.ShowDialog(); }