Exemple #1
0
        protected TraktSyncHistoryRemovePostBuilder AddEpisodeOrIgnore(TraktEpisode episode)
        {
            if (ContainsEpisode(episode))
            {
                return(this);
            }

            var historyEpisode = new TraktSyncHistoryPostEpisode();

            historyEpisode.Ids = episode.Ids;

            (_historyPost.Episodes as List <TraktSyncHistoryPostEpisode>).Add(historyEpisode);

            return(this);
        }
Exemple #2
0
        protected TraktSyncHistoryPostBuilder AddEpisodeOrIgnore(TraktEpisode episode, DateTime?watchedAt = null)
        {
            if (ContainsEpisode(episode))
            {
                return(this);
            }

            var historyEpisode = new TraktSyncHistoryPostEpisode();

            historyEpisode.Ids = episode.Ids;

            if (watchedAt.HasValue)
            {
                historyEpisode.WatchedAt = watchedAt.Value.ToUniversalTime();
            }

            (_historyPost.Episodes as List <TraktSyncHistoryPostEpisode>).Add(historyEpisode);

            return(this);
        }