TraktPlugin.GUI.GUIRecentShouts.OnCommentSelected C# (CSharp) Method

OnCommentSelected() private method

private OnCommentSelected ( GUIListItem item, GUIControl parent ) : void
item MediaPortal.GUI.Library.GUIListItem
parent MediaPortal.GUI.Library.GUIControl
return void
        private void OnCommentSelected(GUIListItem item, GUIControl parent)
        {
            var commentItem = item.TVTag as TraktCommentItem;
            if (commentItem == null) return;

            PublishCommentSkinProperties(commentItem);

            string fanartFileName = string.Empty;

            switch (commentItem.Type)
            {
                case "movie":
                    fanartFileName = TmdbCache.GetMovieBackdropFilename((item as GUICustomListItem).Images.MovieImages);
                    break;

                case "show":
                case "season":
                case "episode":
                    fanartFileName = TmdbCache.GetShowBackdropFilename((item as GUICustomListItem).Images.ShowImages);
                    break;

                case "list":
                    break;
            }

            if (!string.IsNullOrEmpty(fanartFileName))
            {
                GUIImageHandler.LoadFanart(backdrop, fanartFileName);
            }
        }