public static void Update(this ShowSql showBdd, ITraktUserHiddenItem item) { showBdd.Blacklisted = true; if (item.Type == TraktHiddenItemType.Show) { showBdd.Name = item.Show.Title; showBdd.Year = item.Show.Year; } else if (item.Type == TraktHiddenItemType.Movie) { showBdd.Name = item.Movie.Title; showBdd.Year = item.Movie.Year; } var show = item.Show; if (show.Ids.Tmdb.HasValue) { showBdd.Providers[ProviderSql.Tmdb] = show.Ids.Tmdb.ToString(); } if (!string.IsNullOrEmpty(show.Ids.Imdb)) { showBdd.Providers[ProviderSql.Imdb] = show.Ids.Imdb; } }
public static void Update(this SeasonSql seasonBdd, ITraktUserHiddenItem item) { seasonBdd.Blacklisted = true; }