public static void RemoveLinkAniDBTrakt(int animeID, enEpisodeType aniEpType, int aniEpNumber, string traktID, int seasonNumber, int traktEpNumber) { CrossRef_AniDB_TraktV2 xref = RepoFactory.CrossRef_AniDB_TraktV2.GetByTraktID(traktID, seasonNumber, traktEpNumber, animeID, (int) aniEpType, aniEpNumber); if (xref == null) return; RepoFactory.CrossRef_AniDB_TraktV2.Delete(xref.CrossRef_AniDB_TraktV2ID); AniDB_Anime.UpdateStatsByAnimeID(animeID); if (ServerSettings.WebCache_Trakt_Send) { CommandRequest_WebCacheDeleteXRefAniDBTrakt req = new CommandRequest_WebCacheDeleteXRefAniDBTrakt(animeID, (int) aniEpType, aniEpNumber, traktID, seasonNumber, traktEpNumber); req.Save(); } }
public static void RemoveLinkAniDBTrakt(int animeID, enEpisodeType aniEpType, int aniEpNumber, string traktID, int seasonNumber, int traktEpNumber) { CrossRef_AniDB_TraktV2Repository repCrossRef = new CrossRef_AniDB_TraktV2Repository(); CrossRef_AniDB_TraktV2 xref = repCrossRef.GetByTraktID(traktID, seasonNumber, traktEpNumber, animeID, (int)aniEpType, aniEpNumber); if (xref == null) return; repCrossRef.Delete(xref.CrossRef_AniDB_TraktV2ID); StatsCache.Instance.UpdateUsingAnime(animeID); if (ServerSettings.WebCache_Trakt_Send) { CommandRequest_WebCacheDeleteXRefAniDBTrakt req = new CommandRequest_WebCacheDeleteXRefAniDBTrakt(animeID, (int)aniEpType, aniEpNumber, traktID, seasonNumber, traktEpNumber); req.Save(); } }
// Removes all Trakt information from a series, bringing it back to a blank state. public static void RemoveLinkAniDBTrakt(AnimeSeries ser) { CrossRef_AniDB_TraktRepository repCrossRef = new CrossRef_AniDB_TraktRepository(); CrossRef_AniDB_Trakt xref = repCrossRef.GetByAnimeID(ser.AniDB_ID); if (xref == null) return; repCrossRef.Delete(xref.CrossRef_AniDB_TraktID); CommandRequest_WebCacheDeleteXRefAniDBTrakt req = new CommandRequest_WebCacheDeleteXRefAniDBTrakt(ser.AniDB_ID); req.Save(); }