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;
            }
        }
Exemplo n.º 2
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 CheckAndPlayMovie(bool jumpTo)
        {
            var selectedItem = this.Facade.SelectedListItem as GUIMovieListItem;
            if (selectedItem == null) return;

            GUICommon.CheckAndPlayMovie(jumpTo, selectedItem.Movie);
        }
        private void CheckAndPlayMovie(bool jumpTo)
        {
            var selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var selectedMovie = selectedItem.TVTag as TraktMovie;

            GUICommon.CheckAndPlayMovie(jumpTo, selectedMovie);
        }
        private void CheckAndPlayMovie(bool jumpTo)
        {
            var selectedItem = Facade.SelectedListItem as GUIListItem;

            if (selectedItem == null)
            {
                return;
            }

            var calendarItem = selectedItem.TVTag as TraktMovieCalendar;

            if (calendarItem == null)
            {
                return;
            }

            GUICommon.CheckAndPlayMovie(jumpTo, calendarItem.Movie);
        }
Exemplo n.º 6
0
        private void CheckAndPlayMovie(bool jumpTo)
        {
            var selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            var userListItem = selectedItem.TVTag as TraktUserListItem;

            if (userListItem == null || userListItem.Movie == null)
            {
                return;
            }

            GUICommon.CheckAndPlayMovie(jumpTo, userListItem.Movie);
        }
Exemplo n.º 7
0
        private void CheckAndPlayMovie(bool jumpTo)
        {
            GUIListItem selectedItem = this.Facade.SelectedListItem;

            if (selectedItem == null)
            {
                return;
            }

            TraktTrendingMovie selectedMovie = selectedItem.TVTag as TraktTrendingMovie;

            if (selectedMovie == null)
            {
                return;
            }

            GUICommon.CheckAndPlayMovie(jumpTo, selectedMovie);
        }