protected TraktSyncHistoryRemovePostBuilder AddEpisodeOrIgnore(ITraktEpisode episode) { if (ContainsEpisode(episode)) { return(this); } var historyEpisode = new TraktSyncHistoryPostEpisode { Ids = episode.Ids }; (_historyPost.Episodes as List <ITraktSyncHistoryPostEpisode>)?.Add(historyEpisode); return(this); }
protected TraktSyncHistoryPostBuilder AddEpisodeOrIgnore(ITraktEpisode episode, DateTime?watchedAt = null) { if (ContainsEpisode(episode)) { return(this); } var historyEpisode = new TraktSyncHistoryPostEpisode { Ids = episode.Ids }; if (watchedAt.HasValue) { historyEpisode.WatchedAt = watchedAt.Value.ToUniversalTime(); } (_historyPost.Episodes as List <ITraktSyncHistoryPostEpisode>)?.Add(historyEpisode); return(this); }