private void CheckAndPlayEpisode(bool jumpTo)
        {
            var selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var userListItem = selectedItem.TVTag as TraktUserListItem;

            if (userListItem == null)
            {
                return;
            }

            int    seriesid   = Convert.ToInt32(userListItem.Show.Tvdb);
            string searchterm = string.IsNullOrEmpty(userListItem.Show.Imdb) ? userListItem.Show.Title : userListItem.Show.Imdb;

            // if its a show/season, play first unwatched
            if (SelectedType != TraktItemType.episode)
            {
                GUICommon.CheckAndPlayFirstUnwatchedEpisode(userListItem.Show, jumpTo);
            }
            else
            {
                userListItem.Episode.Season = Convert.ToInt32(userListItem.SeasonNumber);
                userListItem.Episode.Number = Convert.ToInt32(userListItem.EpisodeNumber);

                GUICommon.CheckAndPlayEpisode(userListItem.Show, userListItem.Episode);
            }
        }
        private void CheckAndPlayEpisode(bool jumpTo)
        {
            var selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var userListItem = selectedItem.TVTag as TraktListItem;

            if (userListItem == null)
            {
                return;
            }

            // if its a show/season, play first unwatched
            if (SelectedType == TraktItemType.season || SelectedType == TraktItemType.show)
            {
                GUICommon.CheckAndPlayFirstUnwatchedEpisode(userListItem.Show, jumpTo);
            }
            else if (SelectedType == TraktItemType.episode)
            {
                GUICommon.CheckAndPlayEpisode(userListItem.Show, userListItem.Episode);
            }
        }
Example #3
0
        private void PlayActivityItem(bool jumpTo)
        {
            var selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var selectedActivity = selectedItem.TVTag as TraktActivity.Activity;

            if (selectedActivity == null)
            {
                return;
            }

            var type = (ActivityType)Enum.Parse(typeof(ActivityType), selectedActivity.Type);

            switch (type)
            {
            case ActivityType.episode:
                GUICommon.CheckAndPlayEpisode(selectedActivity.Show, selectedActivity.Episode);
                break;

            case ActivityType.show:
                GUICommon.CheckAndPlayFirstUnwatchedEpisode(selectedActivity.Show, jumpTo);
                break;

            case ActivityType.movie:
                GUICommon.CheckAndPlayMovie(jumpTo, selectedActivity.Movie);
                break;
            }
        }
        private void PlayCommentItem(bool jumpTo)
        {
            var selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var selectedComment = selectedItem.TVTag as TraktCommentItem;

            if (selectedComment == null)
            {
                return;
            }

            switch (selectedComment.Type)
            {
            case "episode":
                GUICommon.CheckAndPlayEpisode(selectedComment.Show, selectedComment.Episode);
                break;

            case "show":
            case "season":
                GUICommon.CheckAndPlayFirstUnwatchedEpisode(selectedComment.Show, jumpTo);
                break;

            case "movie":
                GUICommon.CheckAndPlayMovie(jumpTo, selectedComment.Movie);
                break;
            }
        }
Example #5
0
        private void CheckAndPlayEpisode(bool jumpTo)
        {
            var selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var selectedEpisodeSummary = selectedItem.TVTag as TraktEpisodeSummary;

            GUICommon.CheckAndPlayEpisode(selectedEpisodeSummary.Show, selectedEpisodeSummary.Episode);
        }
        private void CheckAndPlayEpisode()
        {
            var selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var item = selectedItem.TVTag as TraktEpisodeWatchList;

            GUICommon.CheckAndPlayEpisode(item.Show, item.Episode);
        }
Example #7
0
        private void CheckAndPlayEpisode()
        {
            var selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var episode = selectedItem.TVTag as TraktEpisodeSummary;

            GUICommon.CheckAndPlayEpisode(Show, episode);
        }
        private void CheckAndPlayEpisode(bool jumpTo)
        {
            GUIListItem selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var episodeSummary = (TraktEpisodeSummary)selectedItem.TVTag;

            GUICommon.CheckAndPlayEpisode(episodeSummary.Show, episodeSummary.Episode);
        }
Example #9
0
        private void CheckAndPlayEpisode()
        {
            GUIListItem selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var item            = (KeyValuePair <TraktShow, TraktWatchListEpisode.Episode>)selectedItem.TVTag;
            var selectedSeries  = item.Key;
            var selectedEpisode = item.Value;

            GUICommon.CheckAndPlayEpisode(selectedSeries, selectedEpisode);
        }
        private void CheckAndPlayEpisode()
        {
            GUIListItem selectedItem = Facade.SelectedListItem as GUIListItem;

            if (selectedItem == null)
            {
                return;
            }

            var episode = selectedItem.TVTag as TraktEpisodeSummary;

            if (episode == null)
            {
                return;
            }

            GUICommon.CheckAndPlayEpisode(episode.Show, episode.Episode);
        }
        private void CheckAndPlayEpisode(bool jumpTo)
        {
            GUIListItem selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var selectedRecent = selectedItem.TVTag as TraktEpisodeHistory;

            if (selectedRecent == null)
            {
                return;
            }

            GUICommon.CheckAndPlayEpisode(selectedRecent.Show, selectedRecent.Episode);
        }
Example #12
0
        private void CheckAndPlayEpisode()
        {
            var selectedItem = Facade.SelectedListItem as GUIListItem;

            if (selectedItem == null)
            {
                return;
            }

            var calendarItem = selectedItem.TVTag as TraktShowCalendar;

            if (calendarItem == null)
            {
                return;
            }

            GUICommon.CheckAndPlayEpisode(calendarItem.Show, calendarItem.Episode);
        }