private IEnumerable <ITraktSyncHistoryPostShowSeason> CreateSyncHistoryPostShowSeasons(PostHistorySeasons seasons)
        {
            var syncHistoryPostShowSeasons = new List <ITraktSyncHistoryPostShowSeason>();

            foreach (PostHistorySeason season in seasons)
            {
                var syncHistoryPostShowSeason = new TraktSyncHistoryPostShowSeason
                {
                    Number = season.Number
                };

                if (season.WatchedAt.HasValue)
                {
                    syncHistoryPostShowSeason.WatchedAt = season.WatchedAt.Value.ToUniversalTime();
                }

                if (season.Episodes?.Count() > 0)
                {
                    var syncHistoryPostShowEpisodes = new List <ITraktSyncHistoryPostShowEpisode>();

                    foreach (PostHistoryEpisode episode in season.Episodes)
                    {
                        var syncHistoryPostShowEpisode = new TraktSyncHistoryPostShowEpisode
                        {
                            Number = episode.Number
                        };

                        if (episode.WatchedAt.HasValue)
                        {
                            syncHistoryPostShowEpisode.WatchedAt = episode.WatchedAt.Value.ToUniversalTime();
                        }

                        syncHistoryPostShowEpisodes.Add(syncHistoryPostShowEpisode);
                    }

                    syncHistoryPostShowSeason.Episodes = syncHistoryPostShowEpisodes;
                }

                syncHistoryPostShowSeasons.Add(syncHistoryPostShowSeason);
            }

            return(syncHistoryPostShowSeasons);
        }
        private ITraktSyncHistoryPostShow CreateSyncHistoryPostShowWithSeasonsCollection(ITraktShow show, DateTime?watchedAt = null, PostHistorySeasons seasons = null)
        {
            var syncHistoryPostShow = CreateSyncHistoryPostShow(show, watchedAt);

            if (seasons != null)
            {
                syncHistoryPostShow.Seasons = CreateSyncHistoryPostShowSeasons(seasons);
            }

            return(syncHistoryPostShow);
        }