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);
            }
        }
        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 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 #4
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;
            }
        }
Example #5
0
        private void CheckAndPlayEpisode(bool jumpTo)
        {
            var selectedItem = this.Facade.SelectedListItem as GUIShowListItem;

            if (selectedItem == null)
            {
                return;
            }

            GUICommon.CheckAndPlayFirstUnwatchedEpisode(selectedItem.Show, jumpTo);
        }
Example #6
0
        private void CheckAndPlayEpisode(bool jumpTo)
        {
            var selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var selectedShow = selectedItem.TVTag as TraktShow;

            GUICommon.CheckAndPlayFirstUnwatchedEpisode(selectedShow, jumpTo);
        }